From 59a39077b80d35fdb47ea67b4d87f1ab9a67807f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 12 Dec 2013 14:55:40 +0100 Subject: fixed #277, #279 (blitting null-canvasses fails) Thanks, Nathan, for the pointer to this! --- morphic.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'morphic.js') diff --git a/morphic.js b/morphic.js index 7305785..f6e55e3 100644 --- a/morphic.js +++ b/morphic.js @@ -1035,7 +1035,7 @@ /*global window, HTMLCanvasElement, getMinimumFontHeight, FileReader, Audio, FileList, getBlurredShadowSupport*/ -var morphicVersion = '2013-November-22'; +var morphicVersion = '2013-December-12'; var modules = {}; // keep track of additional loaded modules var useBlurredShadows = getBlurredShadowSupport(); // check for Chrome-bug @@ -2735,11 +2735,13 @@ Morph.prototype.fullImage = function () { this.allChildren().forEach(function (morph) { if (morph.isVisible) { ctx.globalAlpha = morph.alpha; - ctx.drawImage( - morph.image, - morph.bounds.origin.x - fb.origin.x, - morph.bounds.origin.y - fb.origin.y - ); + if (morph.extent().gt(new Point())) { + ctx.drawImage( + morph.image, + morph.bounds.origin.x - fb.origin.x, + morph.bounds.origin.y - fb.origin.y + ); + } } }); return img; @@ -4581,6 +4583,7 @@ CursorMorph.prototype.processKeyDown = function (event) { this.keyDownEventUsed = true; break; default: + nop(); // this.inspectKeyEvent(event); } // notify target's parent of key event -- cgit v1.3.1