diff options
Diffstat (limited to 'js/stage/stage.reel/stage.js')
-rwxr-xr-x | js/stage/stage.reel/stage.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 4364b45d..8c0f0fa0 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -116,9 +116,6 @@ exports.Stage = Montage.create(Component, { | |||
116 | _userContentLeft: { value: 0 }, | 116 | _userContentLeft: { value: 0 }, |
117 | _userContentTop: { value: 0 }, | 117 | _userContentTop: { value: 0 }, |
118 | _userContentBorder: { value: 0 }, | 118 | _userContentBorder: { value: 0 }, |
119 | savedLeftScroll: { value: null }, | ||
120 | savedTopScroll: { value: null }, | ||
121 | |||
122 | 119 | ||
123 | documentRoot: { | 120 | documentRoot: { |
124 | get: function () { return this._documentRoot; }, | 121 | get: function () { return this._documentRoot; }, |
@@ -247,6 +244,8 @@ exports.Stage = Montage.create(Component, { | |||
247 | 244 | ||
248 | this._scrollLeft = this._iframeContainer.scrollLeft; | 245 | this._scrollLeft = this._iframeContainer.scrollLeft; |
249 | this._scrollTop = this._iframeContainer.scrollTop; | 246 | this._scrollTop = this._iframeContainer.scrollTop; |
247 | this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
248 | this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
250 | 249 | ||
251 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 250 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); |
252 | 251 | ||
@@ -878,18 +877,18 @@ exports.Stage = Montage.create(Component, { | |||
878 | } | 877 | } |
879 | }, | 878 | }, |
880 | 879 | ||
881 | saveStageScroll:{ | 880 | saveScroll:{ |
882 | value: function(){ | 881 | value: function(){ |
883 | this.savedLeftScroll = this._iframeContainer.scrollLeft; | 882 | this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; |
884 | this.savedTopScroll = this._iframeContainer.scrollTop; | 883 | this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; |
885 | } | 884 | } |
886 | }, | 885 | }, |
887 | applySavedScroll:{ | 886 | restoreScroll:{ |
888 | value: function(){ | 887 | value: function(){ |
889 | this._iframeContainer.scrollLeft = this.savedLeftScroll; | 888 | this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; |
890 | this._scrollLeft = this.savedLeftScroll; | 889 | this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; |
891 | this._iframeContainer.scrollTop = this.savedTopScroll; | 890 | this._iframeContainer.scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; |
892 | this._scrollTop = this.savedTopScroll; | 891 | this._scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; |
893 | } | 892 | } |
894 | } | 893 | } |
895 | }); \ No newline at end of file | 894 | }); \ No newline at end of file |