// deck.gl-community // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors const COMMON_DECKGL_PROPS = { getOffset: 'offset', opacity: 'opacity' } as const; export const GRAPH_DECKGL_ACCESSOR_MAP = { circle: { ...COMMON_DECKGL_PROPS, getFillColor: 'fill', getLineColor: 'stroke', getLineWidth: 'strokeWidth', getRadius: 'radius' }, rectangle: { ...COMMON_DECKGL_PROPS, getWidth: 'width', getHeight: 'height', getFillColor: 'fill', getLineColor: 'stroke', getLineWidth: 'strokeWidth' }, 'rounded-rectangle': { ...COMMON_DECKGL_PROPS, getCornerRadius: 'cornerRadius', getRadius: 'radius', getWidth: 'width', getHeight: 'height', getFillColor: 'fill', getLineColor: 'stroke', getLineWidth: 'strokeWidth' }, 'path-rounded-rectangle': { ...COMMON_DECKGL_PROPS, getWidth: 'width', getHeight: 'height', getFillColor: 'fill', getLineColor: 'stroke', getLineWidth: 'strokeWidth', getCornerRadius: 'cornerRadius' }, label: { ...COMMON_DECKGL_PROPS, getColor: 'color', getText: 'text', getSize: 'fontSize', getTextAnchor: 'textAnchor', getAlignmentBaseline: 'alignmentBaseline', getAngle: 'angle', scaleWithZoom: 'scaleWithZoom', textMaxWidth: 'textMaxWidth', textWordBreak: 'textWordBreak', textSizeMinPixels: 'textSizeMinPixels' }, marker: { ...COMMON_DECKGL_PROPS, getColor: 'fill', getSize: 'size', getMarker: 'marker', scaleWithZoom: 'scaleWithZoom' }, Edge: { getColor: 'stroke', getWidth: 'strokeWidth' }, edge: { getColor: 'stroke', getWidth: 'strokeWidth' }, 'edge-label': { getColor: 'color', getText: 'text', getSize: 'fontSize', getTextAnchor: 'textAnchor', getAlignmentBaseline: 'alignmentBaseline', scaleWithZoom: 'scaleWithZoom', textMaxWidth: 'textMaxWidth', textWordBreak: 'textWordBreak', textSizeMinPixels: 'textSizeMinPixels' }, flow: { getColor: 'color', getWidth: 'width', getSpeed: 'speed', getTailLength: 'tailLength' }, arrow: { getColor: 'color', getSize: 'size', getOffset: 'offset' } } as const; export type GraphDeckGLAccessorMap = typeof GRAPH_DECKGL_ACCESSOR_MAP;