MCPcopy Create free account
hub / github.com/microsoft/SandDance / convertGroupRole

Function convertGroupRole

packages/vega-deck.gl/src/stagers.ts:44–62  ·  view source on GitHub ↗
(group: SceneGroup, options: MarkStagerOptions)

Source from the content-addressed store, hash-verified

42}
43
44function convertGroupRole(group: SceneGroup, options: MarkStagerOptions): GroupType {
45 if (group.mark.role === 'legend') return GroupType.legend;
46 if (group.mark.role === 'axis') {
47 if (((group as AxisSceneGroup).mark).zindex === options.zAxisZindex && options.zAxisZindex !== undefined) {
48 return GroupType.zAxis;
49 }
50 const orientItem = getOrientItem(group as AxisSceneGroup);
51 if (orientItem) {
52 switch (orientItem.orient) {
53 case 'bottom':
54 case 'top':
55 return GroupType.xAxis;
56 case 'left':
57 case 'right':
58 return GroupType.yAxis;
59 }
60 }
61 }
62}
63
64const group: MarkStager = (options: MarkStagerOptions, stage: Stage, scene: Scene, x: number, y: number, groupType: GroupType) => {
65

Callers 1

groupFunction · 0.70

Calls 1

getOrientItemFunction · 0.70

Tested by

no test coverage detected