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

Function executeShifts

docs/app/js/sanddance-app.js:138237–138245  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

138235// performed by this function. To prepare the shifts, we have to adjust
138236// change(w+), shift(w+), and change(w-).
138237function executeShifts(v) {
138238 var shift = 0, change = 0, children = v.children, i = children.length, w;
138239 while(--i >= 0){
138240 w = children[i];
138241 w.z += shift;
138242 w.m += shift;
138243 shift += w.s + (change += w.c);
138244 }
138245}
138246// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,
138247// returns the specified (default) ancestor.
138248function nextAncestor(vim, v, ancestor) {

Callers 1

firstWalkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected