MCPcopy
hub / github.com/microsoft/SandDance / group

Function group

docs/app/js/sanddance-app.js:8737–8755  ·  view source on GitHub ↗
(options, stage, scene, x, y, groupType)

Source from the content-addressed store, hash-verified

8735 }
8736}
8737const group = (options, stage, scene, x, y, groupType)=>{
8738 (0, _base.base).vega.sceneVisit(scene, function(g) {
8739 const gx = g.x || 0, gy = g.y || 0;
8740 if (g.context && g.context.background && !stage.backgroundColor) stage.backgroundColor = (0, _color.colorFromString)(g.context.background);
8741 if (g.stroke) {
8742 const facetRect = {
8743 datum: g.datum,
8744 lines: (0, _rule.box)(gx + x, gy + y, g.height, g.width, g.stroke, (0, _defaults.groupStrokeWidth))
8745 };
8746 stage.facets.push(facetRect);
8747 }
8748 groupType = convertGroupRole(g, options) || groupType;
8749 setCurrentAxis(options, stage, groupType);
8750 // draw group contents
8751 (0, _base.base).vega.sceneVisit(g, function(item) {
8752 mainStager(options, stage, item, gx + x, gy + y, groupType);
8753 });
8754 });
8755};
8756function setCurrentAxis(options, stage, groupType) {
8757 let axes;
8758 let role;

Callers 3

formatFunction · 0.70
transformFunction · 0.70
xyFunction · 0.70

Calls 7

convertGroupRoleFunction · 0.70
setCurrentAxisFunction · 0.70
mainStagerFunction · 0.70
keyFunction · 0.70
SortedListFunction · 0.70
setAttributeFunction · 0.70
groupMethod · 0.45

Tested by

no test coverage detected