aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 854b5a2d..28356d1a 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -195,8 +195,10 @@ exports.Stage = Montage.create(Component, {
195 set: function(value) { 195 set: function(value) {
196 this._userPaddingLeft = value; 196 this._userPaddingLeft = value;
197 this._documentOffsetLeft = -value; 197 this._documentOffsetLeft = -value;
198 this.application.ninja.stylesController.setElementStyle(this._documentRoot.ownerDocument.getElementsByTagName("HTML")[0], 198 if(!this._documentRoot) {
199 "padding-left", -value + "px", true); 199 this._documentRoot = this.application.ninja.currentDocument.documentRoot;
200 }
201 this._documentRoot.ownerDocument.getElementsByTagName("HTML")[0].style["padding-left"] = -value + "px";
200 this.userContentLeft = this._documentOffsetLeft; 202 this.userContentLeft = this._documentOffsetLeft;
201 this.updatedStage = true; 203 this.updatedStage = true;
202 } 204 }
@@ -207,8 +209,10 @@ exports.Stage = Montage.create(Component, {
207 set: function(value) { 209 set: function(value) {
208 this._userPaddingTop = value; 210 this._userPaddingTop = value;
209 this._documentOffsetTop = -value; 211 this._documentOffsetTop = -value;
210 this.application.ninja.stylesController.setElementStyle(this._documentRoot.ownerDocument.getElementsByTagName("HTML")[0], 212 if(!this._documentRoot) {
211 "padding-top", -value + "px", true); 213 this._documentRoot = this.application.ninja.currentDocument.documentRoot;
214 }
215 this._documentRoot.ownerDocument.getElementsByTagName("HTML")[0].style["padding-top"] = -value + "px";
212 this.userContentTop = this._documentOffsetTop; 216 this.userContentTop = this._documentOffsetTop;
213 this.updatedStage = true; 217 this.updatedStage = true;
214 } 218 }
@@ -314,8 +318,8 @@ exports.Stage = Montage.create(Component, {
314 318
315 this._scrollLeft = 0; 319 this._scrollLeft = 0;
316 this._scrollTop = 0; 320 this._scrollTop = 0;
317 this._userContentLeft = 0; 321 this._userContentLeft = this._documentOffsetLeft;
318 this._userContentTop = 0; 322 this._userContentTop = this._documentOffsetTop;
319 323
320 this._maxHorizontalScroll = this._documentRoot.scrollWidth - this._canvas.width - 11; 324 this._maxHorizontalScroll = this._documentRoot.scrollWidth - this._canvas.width - 11;
321 this._maxVerticalScroll = this._documentRoot.scrollHeight - this._canvas.height - 11; 325 this._maxVerticalScroll = this._documentRoot.scrollHeight - this._canvas.height - 11;