aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js2
-rwxr-xr-xjs/stage/stage.reel/stage.js17
2 files changed, 19 insertions, 0 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 42b759b5..5d210d41 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -145,6 +145,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
145 if(useStageValues) { 145 if(useStageValues) {
146 initL = stage.userPaddingLeft; 146 initL = stage.userPaddingLeft;
147 initT = stage.userPaddingTop; 147 initT = stage.userPaddingTop;
148 minLeft = stage.templateLeft;
149 minTop = stage.templateTop;
148 this._recalculateScrollOffsets = false; 150 this._recalculateScrollOffsets = false;
149 } 151 }
150 for(i=0; i<len; i++) { 152 for(i=0; i<len; i++) {
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 3552935d..590ff5c3 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -249,6 +249,10 @@ exports.Stage = Montage.create(Component, {
249 this.currentDocument.model.documentOffsetTop = this._documentOffsetTop; 249 this.currentDocument.model.documentOffsetTop = this._documentOffsetTop;
250 this.currentDocument.model.userContentLeft = this._userContentLeft; 250 this.currentDocument.model.userContentLeft = this._userContentLeft;
251 this.currentDocument.model.userContentTop = this._userContentTop; 251 this.currentDocument.model.userContentTop = this._userContentTop;
252 this.currentDocument.model.templateLeft = this.templateLeft;
253 this.currentDocument.model.templateTop = this.templateTop;
254 this.currentDocument.model.minLeftElement = this.minLeftElement;
255 this.currentDocument.model.minTopElement = this.minTopElement;
252 256
253 //call configure false with the old document on the selected tool to tear down down any temp. stuff 257 //call configure false with the old document on the selected tool to tear down down any temp. stuff
254 this.application.ninja.toolsData.selectedToolInstance._configure(false); 258 this.application.ninja.toolsData.selectedToolInstance._configure(false);
@@ -279,6 +283,9 @@ exports.Stage = Montage.create(Component, {
279 _userPaddingLeft: { value: 0 }, 283 _userPaddingLeft: { value: 0 },
280 _userPaddingTop: { value: 0 }, 284 _userPaddingTop: { value: 0 },
281 285
286 templateLeft: { value: 0 },
287 templateTop: { value: 0 },
288
282 // keep track of the elements that determine the minimum left and top scrollable amount 289 // keep track of the elements that determine the minimum left and top scrollable amount
283 minLeftElement: { value: null }, 290 minLeftElement: { value: null },
284 minTopElement: { value: null }, 291 minTopElement: { value: null },
@@ -378,6 +385,10 @@ exports.Stage = Montage.create(Component, {
378 this._userContentTop = this.currentDocument.model.userContentTop; 385 this._userContentTop = this.currentDocument.model.userContentTop;
379 this._scrollLeft = this.currentDocument.model.scrollLeft; 386 this._scrollLeft = this.currentDocument.model.scrollLeft;
380 this._scrollTop = this.currentDocument.model.scrollTop; 387 this._scrollTop = this.currentDocument.model.scrollTop;
388 this.templateLeft = this.currentDocument.model.templateLeft;
389 this.templateTop = this.currentDocument.model.templateTop;
390 this.minLeftElement = this.currentDocument.model.minLeftElement;
391 this.minTopElement = this.currentDocument.model.minTopElement;
381 } else { 392 } else {
382 this._userPaddingLeft = 0; 393 this._userPaddingLeft = 0;
383 this._userPaddingTop = 0; 394 this._userPaddingTop = 0;
@@ -387,6 +398,10 @@ exports.Stage = Montage.create(Component, {
387 this._userContentTop = 0; 398 this._userContentTop = 0;
388 this._scrollLeft = 0; 399 this._scrollLeft = 0;
389 this._scrollTop = 0; 400 this._scrollTop = 0;
401 this.templateLeft = 0;
402 this.templateTop = 0;
403 this.minLeftElement = null;
404 this.minTopElement = null;
390 } 405 }
391 406
392 // Recalculate the canvas sizes because of splitter resizing 407 // Recalculate the canvas sizes because of splitter resizing
@@ -404,9 +419,11 @@ exports.Stage = Montage.create(Component, {
404 var initialTop = parseInt((this.canvas.height - designView._template.size.height)/2); 419 var initialTop = parseInt((this.canvas.height - designView._template.size.height)/2);
405 if(initialLeft > this.documentOffsetLeft) { 420 if(initialLeft > this.documentOffsetLeft) {
406 this.userPaddingLeft = -initialLeft; 421 this.userPaddingLeft = -initialLeft;
422 this.templateLeft = -initialLeft;
407 } 423 }
408 if(initialTop > this.documentOffsetTop) { 424 if(initialTop > this.documentOffsetTop) {
409 this.userPaddingTop = -initialTop; 425 this.userPaddingTop = -initialTop;
426 this.templateTop = -initialTop;
410 } 427 }
411 } 428 }
412 429