aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorJonathan Duran2012-06-26 08:13:49 -0700
committerJonathan Duran2012-06-26 08:13:49 -0700
commit1bc2fb4441387877bc6b1aef78e4e466f526f60f (patch)
treeeef16b66f6771862efac72aaeaa692c9e322c161 /js/stage
parent616ade06c8f669d18c27d27c3ee46a9c844a54ca (diff)
parentd2e88bb251efb29f13911942f1f91101715c727e (diff)
downloadninja-1bc2fb4441387877bc6b1aef78e4e466f526f60f.tar.gz
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index f4de3070..5e913c76 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,13 @@ 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
289 // keep track of the elements that determine the minimum left and top scrollable amount
290 minLeftElement: { value: null },
291 minTopElement: { value: null },
292
282 userPaddingLeft: { 293 userPaddingLeft: {
283 get: function() { return this._userPaddingLeft; }, 294 get: function() { return this._userPaddingLeft; },
284 set: function(value) { 295 set: function(value) {
@@ -374,6 +385,10 @@ exports.Stage = Montage.create(Component, {
374 this._userContentTop = this.currentDocument.model.userContentTop; 385 this._userContentTop = this.currentDocument.model.userContentTop;
375 this._scrollLeft = this.currentDocument.model.scrollLeft; 386 this._scrollLeft = this.currentDocument.model.scrollLeft;
376 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;
377 } else { 392 } else {
378 this._userPaddingLeft = 0; 393 this._userPaddingLeft = 0;
379 this._userPaddingTop = 0; 394 this._userPaddingTop = 0;
@@ -383,6 +398,10 @@ exports.Stage = Montage.create(Component, {
383 this._userContentTop = 0; 398 this._userContentTop = 0;
384 this._scrollLeft = 0; 399 this._scrollLeft = 0;
385 this._scrollTop = 0; 400 this._scrollTop = 0;
401 this.templateLeft = 0;
402 this.templateTop = 0;
403 this.minLeftElement = null;
404 this.minTopElement = null;
386 } 405 }
387 406
388 // Recalculate the canvas sizes because of splitter resizing 407 // Recalculate the canvas sizes because of splitter resizing
@@ -400,9 +419,11 @@ exports.Stage = Montage.create(Component, {
400 var initialTop = parseInt((this.canvas.height - designView._template.size.height)/2); 419 var initialTop = parseInt((this.canvas.height - designView._template.size.height)/2);
401 if(initialLeft > this.documentOffsetLeft) { 420 if(initialLeft > this.documentOffsetLeft) {
402 this.userPaddingLeft = -initialLeft; 421 this.userPaddingLeft = -initialLeft;
422 this.templateLeft = -initialLeft;
403 } 423 }
404 if(initialTop > this.documentOffsetTop) { 424 if(initialTop > this.documentOffsetTop) {
405 this.userPaddingTop = -initialTop; 425 this.userPaddingTop = -initialTop;
426 this.templateTop = -initialTop;
406 } 427 }
407 } 428 }
408 429