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

Function group

packages/vega-deck.gl/src/stagers.ts:64–89  ·  view source on GitHub ↗
(options: MarkStagerOptions, stage: Stage, scene: Scene, x: number, y: number, groupType: GroupType)

Source from the content-addressed store, hash-verified

62}
63
64const group: MarkStager = (options: MarkStagerOptions, stage: Stage, scene: Scene, x: number, y: number, groupType: GroupType) => {
65
66 base.vega.sceneVisit(scene, function (g: SceneGroup) {
67
68 const gx = g.x || 0, gy = g.y || 0;
69 if (g.context && g.context.background && !stage.backgroundColor) {
70 stage.backgroundColor = colorFromString(g.context.background);
71 }
72 if (g.stroke) {
73 const facetRect: FacetRect = {
74 datum: g.datum,
75 lines: box(gx + x, gy + y, g.height, g.width, g.stroke, groupStrokeWidth),
76 };
77 stage.facets.push(facetRect);
78 }
79
80 groupType = convertGroupRole(g, options) || groupType;
81 setCurrentAxis(options, stage, groupType);
82
83 // draw group contents
84 base.vega.sceneVisit(g, function (item: Scene) {
85 mainStager(options, stage, item, gx + x, gy + y, groupType);
86 });
87
88 });
89};
90
91function setCurrentAxis(options: MarkStagerOptions, stage: Stage, groupType: GroupType) {
92 let axes: Axis[];

Callers

nothing calls this directly

Calls 5

colorFromStringFunction · 0.90
boxFunction · 0.90
convertGroupRoleFunction · 0.70
setCurrentAxisFunction · 0.70
mainStagerFunction · 0.70

Tested by

no test coverage detected