本文整理汇总了TypeScript中tree.ops.reconstruct方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ops.reconstruct方法的具体用法?TypeScript ops.reconstruct怎么用?TypeScript ops.reconstruct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tree.ops
的用法示例。
在下文中一共展示了ops.reconstruct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: initiate
function initiate(fromData) {
data = fromData;
tree = treeBuild(treeOps.reconstruct(data.game.treeParts));
var initialPath = treePath.fromNodeList(treeOps.mainlineNodeList(tree.root));
// play | try | view
vm.mode = 'play';
vm.loading = false;
vm.round = undefined;
vm.voted = undefined;
vm.justPlayed = undefined;
vm.resultSent = false;
vm.lastFeedback = 'init';
vm.initialPath = initialPath;
vm.initialNode = tree.nodeAtPath(initialPath);
setPath(treePath.init(initialPath));
setTimeout(function() {
jump(initialPath);
redraw();
}, 500);
// just to delay button display
vm.canViewSolution = false;
setTimeout(function() {
vm.canViewSolution = true;
redraw();
}, 5000);
moveTest = moveTestBuild(vm, data.puzzle);
withGround(function(g) {
g.setAutoShapes([]);
g.setShapes([]);
showGround(g);
});
instanciateCeval();
history.replaceState(null, '', '/training/' + data.puzzle.id);
};