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

Function convertGroupRole

docs/app/js/sanddance-app.js:8722–8736  ·  view source on GitHub ↗
(group2, options)

Source from the content-addressed store, hash-verified

8720 return group1.datum;
8721}
8722function convertGroupRole(group2, options) {
8723 if (group2.mark.role === "legend") return (0, _interfaces.GroupType).legend;
8724 if (group2.mark.role === "axis") {
8725 if (group2.mark.zindex === options.zAxisZindex && options.zAxisZindex !== undefined) return (0, _interfaces.GroupType).zAxis;
8726 const orientItem = getOrientItem(group2);
8727 if (orientItem) switch(orientItem.orient){
8728 case "bottom":
8729 case "top":
8730 return (0, _interfaces.GroupType).xAxis;
8731 case "left":
8732 case "right":
8733 return (0, _interfaces.GroupType).yAxis;
8734 }
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;

Callers 1

groupFunction · 0.70

Calls 1

getOrientItemFunction · 0.70

Tested by

no test coverage detected