From da5dfc8863ad47c48414ff1fdacbacdb91abd30c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 14 Mar 2012 23:25:34 -0700 Subject: Fixing the splitter resize canvas bug by getting the size when a document is opened. Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/stage/stage.reel') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index a624b2c6..e139af97 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -170,8 +170,7 @@ exports.Stage = Montage.create(Component, { // Hack for now until a full component this.layout.draw(); - } - else if(this.updatedStage) { + } else if(this.updatedStage) { this.layout.draw(); this.layout.draw3DInfo(true); } @@ -235,6 +234,10 @@ exports.Stage = Montage.create(Component, { this.hideCanvas(false); + // Recalculate the canvas sizes because of splitter resizing + this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this.element.offsetWidth - 11 ; + this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this.element.offsetHeight - 11; + this._documentRoot = this.application.ninja.currentDocument.documentRoot; this._viewport = this.application.ninja.currentDocument.documentRoot.parentNode; -- cgit v1.2.3