main/static/js/tree_gpl/codebase/tree.js
// TODO: also use the state.rgtSib and state.rgtNode bounds, plus reduce LIS range
also use the state.rgtSib and state.rgtNode bounds, plus reduce LIS range
also use the state . rgtSib and state . rgtNode bounds plus reduce LIS range
function sortDOM(node, parEl, body, state) {
	var kids = Array.prototype.slice.call(parEl.childNodes);
	var domIdxs = [];
	for (var k = 0; k < kids.length; k++) {
		var n = kids[k]._node;
		if (n.parent === node)
			{ domIdxs.push(n.idx); }
	}
	var tombs = longestIncreasingSubsequence(domIdxs).map(function (i) { return domIdxs[i]; });
	for (var i = 0; i < tombs.length; i++)
		{ body[tombs[i]]._lis = true; }
	state.tombs = tombs;
	while (1) {
		var r = syncLft(node, parEl, body, state, null, true);
		if (r === BREAK_ALL) { break; }
	}
}
function sortDOM ( node , parEl , body , state ) { var kids = Array . prototype . slice . call ( parEl . childNodes ) ; var domIdxs = [ ] ; for ( var k = 0 ; k < kids . length ; k ++ ) { var n = kids [ k ] . _node ; if ( n . parent === node ) { domIdxs . push ( n . idx ) ; } } var tombs = longestIncreasingSubsequence ( domIdxs ) . map ( function ( i ) { return domIdxs [ i ] ; } ) ; for ( var i = 0 ; i < tombs . length ; i ++ ) { body [ tombs [ i ] ] . _lis = true ; } state . tombs = tombs ; while ( 1 ) { var r = syncLft ( node , parEl , body , state , null , true ) ; if ( r === BREAK_ALL ) { break ; } } }
TODO: also use the state.rgtSib and state.rgtNode bounds, plus reduce LIS range
TODO : also use the state . rgtSib and state . rgtNode bounds plus reduce LIS range
// list of non-movable vnode indices (already in correct order in old dom)