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

Function onBeforeCreateLayers

docs/app/js/sanddance-app.js:337–349  ·  view source on GitHub ↗
(stage, specCapabilities)

Source from the content-addressed store, hash-verified

335var _columnMap = require("./controls/columnMap");
336var _sanddanceReact = require("@msrvida/sanddance-react");
337function onBeforeCreateLayers(stage, specCapabilities) {
338 for(let axisName in stage.axes)specCapabilities.roles.forEach((specRole)=>{
339 if (specRole.role === axisName) {
340 let axes = stage.axes[axisName];
341 axes.forEach((axis)=>{
342 if (axis.title) {
343 const textItem = axis.title;
344 textItem.specRole = specRole;
345 }
346 });
347 }
348 });
349}
350function px(n) {
351 return n + "px";
352}

Callers

nothing calls this directly

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected