diff options
author | Kruti Shah | 2012-06-26 09:46:59 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-26 09:46:59 -0700 |
commit | 4b4a95140d52e191e5e637371dfc369e50e7f9c8 (patch) | |
tree | 274b55f66527a9925032c5d6da4baa6f12be8ada /js/stage | |
parent | 4bf8e4cdc179c3b388fc06f26008808aa4b77eb0 (diff) | |
parent | f0d4d89d856b99da1ca8dd3366c48bb76ba6b1f6 (diff) | |
download | ninja-4b4a95140d52e191e5e637371dfc369e50e7f9c8.tar.gz |
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/layout.js | 3 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 21 |
2 files changed, 24 insertions, 0 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js index 28484b71..99c3a403 100755 --- a/js/stage/layout.js +++ b/js/stage/layout.js | |||
@@ -46,6 +46,9 @@ exports.Layout = Montage.create(Component, { | |||
46 | return; | 46 | return; |
47 | } | 47 | } |
48 | 48 | ||
49 | drawUtils._eltArray.length = 0; | ||
50 | drawUtils._planesArray.length = 0; | ||
51 | |||
49 | this._currentDocument = value; | 52 | this._currentDocument = value; |
50 | 53 | ||
51 | if(!value) { | 54 | if(!value) { |
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 | ||