in src/core/node.js [96:106]
getPathToRootLength(){
let length = 0;
let current = this;
while(current){
const targetPos = current.parent ? current.parent.currentPos : current.idealPos;
length += Math.abs(current.currentPos - targetPos);
current = current.parent;
}
return length;
}