aboutsummaryrefslogtreecommitdiff
path: root/js/stage/stage.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-02-08 15:36:53 -0800
committerAnanya Sen2012-02-08 15:36:53 -0800
commit36b2e540f06cef3887e7d0fea60527fee51e2a40 (patch)
treeb636cba0ad7d4efedca3fbf791b05728f8cff37d /js/stage/stage.reel
parent729bc48212d7244539c99ca206be673eed011115 (diff)
downloadninja-36b2e540f06cef3887e7d0fea60527fee51e2a40.tar.gz
fixed undo/redo for each code view document, changed new file integration with io mediator
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/stage/stage.reel')
-rwxr-xr-xjs/stage/stage.reel/stage.js33
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