From 71795a786342b3d84ef904dc448b4ce840a44810 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 19 Jul 2012 13:37:04 -0700 Subject: IKNINJA-1924 - Hovering over panel resizers after collapsing and expanding panel causes error. Canvas sizes were not updated when using the splitter to toggle collapse/expansion of panels. This was fixed by the StageDrawingFixes pull request. We should also guard agains null value in stage's getElement routine. Signed-off-by: Nivesh Rajbhandari --- js/stage/stage.reel/stage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 7ac64976..7c2fa903 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -894,7 +894,9 @@ exports.Stage = Montage.create(Component, { point = webkitConvertPointFromPageToNode(this.canvas, new WebKitPoint(position.pageX - docView.iframe.contentWindow.pageXOffset + this.documentOffsetLeft, position.pageY - docView.iframe.contentWindow.pageYOffset + this.documentOffsetTop)); element = this.currentDocument.model.views.design.getElementFromPoint(point.x - this.userContentLeft,point.y - this.userContentTop); -// if(!element) debugger; + if(!element) { + return this.currentDocument.model.domContainer; + } // workaround Chrome 3d bug if(this.application.ninja.toolsData.selectedToolInstance._canSnap && this.currentDocument.inExclusion(element) !== -1) { point = webkitConvertPointFromPageToNode(this.canvas, new WebKitPoint(position.pageX, position.pageY)); -- cgit v1.2.3