From 5a74b74e8ec76d60cadf623cabaa0b667f1c4058 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 2 May 2012 11:08:59 -0700 Subject: code cleanup Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 515165bf..a7c22a7f 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -958,8 +958,9 @@ exports.Stage = Montage.create(Component, { this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; } - }, - restoreScroll:{ + }, + + restoreScroll:{ value: function(){ this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; -- cgit v1.2.3 From 2078bfa96afaef40acb4edac99848ba55e808ef1 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 3 May 2012 15:15:21 -0700 Subject: Refactor creating elements. Removed makeNJElement and separated the model creation Signed-off-by: Valerio Virgillito --- js/stage/stage.reel/stage.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/stage') diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index a7c22a7f..b181dc70 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js @@ -855,6 +855,12 @@ exports.Stage = Montage.create(Component, { } }, + setStageAsViewport: { + value: function() { + this.stageDeps.viewUtils.setViewportObj(this.application.ninja.currentDocument.documentRoot); + } + }, + setZoom: { value: function(value) { if(!this._firstDraw) -- cgit v1.2.3