on master help sign in
Add keyFrameAnimation for hot-swapping.
commit800490540985c65d54ccd88557f416cf20497ce4 authorevancz <info@elm-lang.org> dateSat 1 Jun 2013, 00:13 (13 years ago) parent6c2fb97
1 file changed+3−1
runtime/HotSwap.js+3−1
runtime/HotSwap.js+3−1
@@ -15,7 +15,9 @@ ElmRuntime.swap = function(from, to) {
1515 }
1616 var canSwap = depthFirstTraversals(similar, from.inputs, to.inputs);
1717 if (canSwap) { depthFirstTraversals(swap, from.inputs, to.inputs); }
18− from.node.parentNode.replaceChild(to.node, from.node);
18+ ElmRuntime.draw(function() {
19+ from.node.parentNode.replaceChild(to.node, from.node)
20+ });
1921 return canSwap;
2022}
2123