diff options
Diffstat (limited to 'js/stage/stage.reel/stage.js')
-rwxr-xr-x[-rw-r--r--] | js/stage/stage.reel/stage.js | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 6d9a7355..59eb9317 100644..100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -4,15 +4,13 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component, |
9 | 9 | drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils, | |
10 | var drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils; | 10 | vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils; |
11 | var vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils; | ||
12 | 11 | ||
13 | exports.Stage = Montage.create(Component, { | 12 | exports.Stage = Montage.create(Component, { |
14 | 13 | ||
15 | textTool: { value: null }, | ||
16 | // TODO - Need to figure out how to remove this dependency | 14 | // TODO - Need to figure out how to remove this dependency |
17 | // Needed by some tools that depend on selectionDrawn event to set up some logic | 15 | // Needed by some tools that depend on selectionDrawn event to set up some logic |
18 | drawNow: { value : false }, | 16 | drawNow: { value : false }, |
@@ -117,9 +115,6 @@ exports.Stage = Montage.create(Component, { | |||
117 | _userContentLeft: { value: 0 }, | 115 | _userContentLeft: { value: 0 }, |
118 | _userContentTop: { value: 0 }, | 116 | _userContentTop: { value: 0 }, |
119 | _userContentBorder: { value: 0 }, | 117 | _userContentBorder: { value: 0 }, |
120 | savedLeftScroll: { value: null }, | ||
121 | savedTopScroll: { value: null }, | ||
122 | |||
123 | 118 | ||
124 | documentRoot: { | 119 | documentRoot: { |
125 | get: function () { return this._documentRoot; }, | 120 | get: function () { return this._documentRoot; }, |
@@ -248,6 +243,8 @@ exports.Stage = Montage.create(Component, { | |||
248 | 243 | ||
249 | this._scrollLeft = this._iframeContainer.scrollLeft; | 244 | this._scrollLeft = this._iframeContainer.scrollLeft; |
250 | this._scrollTop = this._iframeContainer.scrollTop; | 245 | this._scrollTop = this._iframeContainer.scrollTop; |
246 | this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
247 | this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
251 | 248 | ||
252 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 249 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); |
253 | 250 | ||
@@ -883,5 +880,20 @@ exports.Stage = Montage.create(Component, { | |||
883 | 880 | ||
884 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); | 881 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); |
885 | } | 882 | } |
886 | } | 883 | }, |
884 | |||
885 | saveScroll:{ | ||
886 | value: function(){ | ||
887 | this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
888 | this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
889 | } | ||
890 | }, | ||
891 | restoreScroll:{ | ||
892 | value: function(){ | ||
893 | this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
894 | this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
895 | this._iframeContainer.scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
896 | this._scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
897 | } | ||
898 | } | ||
887 | }); \ No newline at end of file | 899 | }); \ No newline at end of file |