on master help sign in
Debugger: fix initialization by using main node instead of graphics node (their values are the same).
commitf20fa4e023d0ee22e1a99b2204acbb801fe349a3 authorLaszlo Pandy <laszlo.pandy@prezi.com> dateMon 4 Nov 2013, 15:30 (13 years ago) parent38b9301
1 file changed+3−5
runtime/Debugger.js+3−5
runtime/Debugger.js+3−5
@@ -7,9 +7,7 @@ Elm.debuggerAttach = function(module) {
77 return {
88 make: function(runtime) {
99 var wrappedModule = debugModule(module, runtime);
10− Elm.debuggerInit = function() {
11− Elm.Debugger = debuggerInit(wrappedModule, runtime);
12− };
10+ Elm.Debugger = debuggerInit(wrappedModule, runtime);
1311 return wrappedModule.moduleInstance;
1412 }
1513 };
@@ -98,10 +96,9 @@ function debugModule(module, runtime) {
9896
9997function debuggerInit(debugModule, runtime) {
10098 var Signal = Elm.Signal.make(runtime);
101− var graphicsNode = debugModule.moduleInstance.main.kids[0];
10299
103100 var tracePath = tracePathInit(runtime);
104− var tracePathNode = A2(Signal.lift, tracePath.graphicsUpdate, graphicsNode);
101+ var tracePathNode = A2(Signal.lift, tracePath.graphicsUpdate, debugModule.moduleInstance.main);
105102 runtime.node.parentNode.appendChild(tracePath.canvas);
106103
107104 function resetProgram() {
@@ -160,6 +157,7 @@ function debuggerInit(debugModule, runtime) {
160157 }
161158
162159 function redrawGraphics() {
160+ var graphicsNode = debugModule.moduleInstance.main.kids[0];
163161 graphicsNode.recv(Date.now(), true, debugModule.moduleInstance.main.id);
164162 }
165163