diff options
author | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-14 11:07:21 -0800 |
commit | f060190a3bffd9a16718f2ce0499699103d46372 (patch) | |
tree | a308fe7eacec2156c8212dff0892a3de925d5f9a /js/stage/stage.reel/stage.js | |
parent | f766cc203f30ea43ae8b83cf4b65d45cc4435ee9 (diff) | |
parent | 33bc9d62b8e6694500bf14d5b18187bd99a520a3 (diff) | |
download | ninja-f060190a3bffd9a16718f2ce0499699103d46372.tar.gz |
Merge branch 'FileIO' of https://github.com/joseeight/ninja-internal into integration
Diffstat (limited to 'js/stage/stage.reel/stage.js')
-rwxr-xr-x[-rw-r--r--] | js/stage/stage.reel/stage.js | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 6d9a7355..89b2d475 100644..100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -4,11 +4,10 @@ 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 | ||
@@ -117,9 +116,6 @@ exports.Stage = Montage.create(Component, { | |||
117 | _userContentLeft: { value: 0 }, | 116 | _userContentLeft: { value: 0 }, |
118 | _userContentTop: { value: 0 }, | 117 | _userContentTop: { value: 0 }, |
119 | _userContentBorder: { value: 0 }, | 118 | _userContentBorder: { value: 0 }, |
120 | savedLeftScroll: { value: null }, | ||
121 | savedTopScroll: { value: null }, | ||
122 | |||
123 | 119 | ||
124 | documentRoot: { | 120 | documentRoot: { |
125 | get: function () { return this._documentRoot; }, | 121 | get: function () { return this._documentRoot; }, |
@@ -248,6 +244,8 @@ exports.Stage = Montage.create(Component, { | |||
248 | 244 | ||
249 | this._scrollLeft = this._iframeContainer.scrollLeft; | 245 | this._scrollLeft = this._iframeContainer.scrollLeft; |
250 | 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; | ||
251 | 249 | ||
252 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 250 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); |
253 | 251 | ||
@@ -883,5 +881,20 @@ exports.Stage = Montage.create(Component, { | |||
883 | 881 | ||
884 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); | 882 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); |
885 | } | 883 | } |
886 | } | 884 | }, |
885 | |||
886 | saveScroll:{ | ||
887 | value: function(){ | ||
888 | this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
889 | this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
890 | } | ||
891 | }, | ||
892 | restoreScroll:{ | ||
893 | value: function(){ | ||
894 | this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
895 | this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
896 | this._iframeContainer.scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
897 | this._scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
898 | } | ||
899 | } | ||
887 | }); \ No newline at end of file | 900 | }); \ No newline at end of file |