From 259974ca878885d06a4e95f11759bc2595fe736d Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Tue, 19 Jul 2011 14:30:10 -0400 Subject: [PATCH] images appear to be starting to display --- world/kernel.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/world/kernel.js b/world/kernel.js index dc233e5..a74940c 100644 --- a/world/kernel.js +++ b/world/kernel.js @@ -27,7 +27,7 @@ var bigBang = function(MACHINE, initW, handlers) { var oldArgcount = MACHINE.argcount; - var toplevelNode = $('
').css('border', '1px solid black').appendTo(document.body).get(0); + var toplevelNode = $('').css('border', '0px').appendTo(document.body).get(0); var configs = []; var isOutputConfigSeen = false; @@ -209,8 +209,12 @@ ToDraw.prototype.toRawHandler = function(MACHINE, toplevelNode) { reusableCanvas.jsworldOpaque = true; reusableCanvasNode = rawJsworld.node_to_tree(reusableCanvas); } - reusableCanvas.width = width; - reusableCanvas.height = height; + if (reusableCanvas.width !== width) { + reusableCanvas.width = width; + } + if (reusableCanvas.height !== height) { + reusableCanvas.height = height; + } var ctx = reusableCanvas.getContext("2d"); v.render(ctx, 0, 0); success([toplevelNode, reusableCanvasNode]);