aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorAnanya Sen2012-05-22 17:59:03 -0700
committerAnanya Sen2012-05-22 17:59:03 -0700
commitae9f289ab9c6fd17ae88fd272dfaa7beabcd649b (patch)
tree9e27878524eb2781a7f3094de0d5ed3f84624980 /js/stage
parentee54342b5f4fdd41c46543d6402e649e4b3d57cb (diff)
parenta341522e3603c18ab3b93defa894e3be702dd0f4 (diff)
downloadninja-ae9f289ab9c6fd17ae88fd272dfaa7beabcd649b.tar.gz
Merge branch 'refs/heads/master-dom-architecture' into dom-architecture
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.js27
1 files changed, 10 insertions, 17 deletions
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index f768f03a..69cfa7ba 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -468,26 +468,19 @@ exports.Stage = Montage.create(Component, {
468 */ 468 */
469 handleScroll: { 469 handleScroll: {
470 value: function() { 470 value: function() {
471 // TODO: Remove marker for old template: NINJA-STAGE-REWORK
472 if(this.application.ninja.currentDocument.documentRoot.id === "UserContent") {
473 this._scrollLeft = this._iframeContainer.scrollLeft;
474 this._scrollTop = this._iframeContainer.scrollTop;
475 471
476 this.userContentLeft = this._documentOffsetLeft - this._scrollLeft + this._userContentBorder; 472 this._scrollLeft = this.application.ninja.currentDocument.model.views.design.document.body.scrollLeft;
477 this.userContentTop = this._documentOffsetTop - this._scrollTop + this._userContentBorder; 473 this._scrollTop = this.application.ninja.currentDocument.model.views.design.document.body.scrollTop;
478 } else {
479 this._scrollLeft = this.application.ninja.currentDocument.model.views.design.document.body.scrollLeft;
480 this._scrollTop = this.application.ninja.currentDocument.model.views.design.document.body.scrollTop;
481 474
482 this.userContentLeft = this._documentOffsetLeft - this._scrollLeft; 475 this.userContentLeft = this._documentOffsetLeft - this._scrollLeft;
483 this.userContentTop = this._documentOffsetTop - this._scrollTop; 476 this.userContentTop = this._documentOffsetTop - this._scrollTop;
477
478 // TODO - scroll events are not dependable. We may need to use a timer to simulate
479 // scrollBegin and scrollEnd. For now, the Pan Tool will keep track of the stage's scroll values
480 // on mouse down.
481 // this._maxHorizontalScroll = this.application.ninja.currentDocument.documentRoot.scrollWidth - this._canvas.width - 11;
482 // this._maxVerticalScroll = this.application.ninja.currentDocument.documentRoot.scrollHeight - this._canvas.height - 11;
484 483
485 // TODO - scroll events are not dependable. We may need to use a timer to simulate
486 // scrollBegin and scrollEnd. For now, the Pan Tool will keep track of the stage's scroll values
487 // on mouse down.
488// this._maxHorizontalScroll = this.application.ninja.currentDocument.documentRoot.scrollWidth - this._canvas.width - 11;
489// this._maxVerticalScroll = this.application.ninja.currentDocument.documentRoot.scrollHeight - this._canvas.height - 11;
490 }
491 484
492 // Need to clear the snap cache and set up the drag plane 485 // Need to clear the snap cache and set up the drag plane
493 //snapManager.setupDragPlaneFromPlane( workingPlane ); 486 //snapManager.setupDragPlaneFromPlane( workingPlane );