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

Function zorder

docs/tests/v2/es6/js/sanddance.js:98834–98850  ·  view source on GitHub ↗
(scene)

Source from the content-addressed store, hash-verified

98832}
98833
98834function zorder(scene) {
98835 if (!scene.zdirty) return scene.zitems;
98836 var items = scene.items,
98837 output = [],
98838 item,
98839 i,
98840 n;
98841
98842 for (i = 0, n = items.length; i < n; ++i) {
98843 item = items[i];
98844 item.index = i;
98845 if (item.zindex) output.push(item);
98846 }
98847
98848 scene.zdirty = false;
98849 return scene.zitems = output.sort(compare);
98850}
98851
98852function visit(scene, visitor) {
98853 var items = scene.items,

Callers 2

visitFunction · 0.70
pickVisitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected