diff --git a/web-world/examples/forward-backward/forward-backward.rkt b/web-world/examples/forward-backward/forward-backward.rkt index c1fbc92..986b622 100644 --- a/web-world/examples/forward-backward/forward-backward.rkt +++ b/web-world/examples/forward-backward/forward-backward.rkt @@ -19,7 +19,7 @@ (define (clear-all a-view) (define (loop a-view n) - (define updated-view (update-view-css a-view "border" "none")) + (define updated-view a-view) ;; (update-view-css a-view "border" "none")) (cond [(view-forward? updated-view) (loop (view-forward updated-view) (add1 n))] diff --git a/web-world/js-impl.js b/web-world/js-impl.js index d6aac71..08e785a 100644 --- a/web-world/js-impl.js +++ b/web-world/js-impl.js @@ -235,6 +235,8 @@ MockView.prototype.updateCss = function(name, value) { return this.act( function(cursor) { + console.log("functionally: ", + $(cursor.node[0].cloneNode(false)).css(name, value).get(0)); return cursor.replaceNode([$(cursor.node[0].cloneNode(false)) .css(name, value).get(0)] .concat(cursor.node.slice(1))); @@ -243,6 +245,10 @@ return eventHandlers; }, function(view) { + if (view.focus.length === 0) { + console.log('update css: empty focus?!'); + } + console.log('css: updating:\n', view.focus); view.focus.css(name, value); }); }; @@ -525,8 +531,6 @@ return this.cursor.node[0].id; }; - - MockView.prototype.isUpMovementOk = function() { return this.cursor.canUp(); }; @@ -1226,6 +1230,7 @@ // update, and have to do it from scratch. var nonce = Math.random(); var originalMockView = view.getMockAndResetFocus(nonce); + console.log("before: ", arrayTreeToDomNode(originalMockView.cursor.node)); toDraw(MACHINE, world, originalMockView, @@ -1233,6 +1238,9 @@ if (newMockView.nonce === nonce) { var i; var actions = newMockView.getPendingActions(); + console.log("this should match:", + view.focus.clone(true).get(0)); + console.log("actions", actions.length); for (i = 0; i < actions.length; i++) { actions[i](view); }