diff options
author | Jose Antonio Marquez | 2012-05-22 18:02:36 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-05-22 18:02:36 -0700 |
commit | 27e6e1238ec1adb34aa396074e2559801c7e4314 (patch) | |
tree | d27f27fd071d9df575c6014eed0efee252ff0390 /js/stage | |
parent | 75fe4f36a6768d688792bc1925cfa4bfa508ac3e (diff) | |
parent | a341522e3603c18ab3b93defa894e3be702dd0f4 (diff) | |
download | ninja-27e6e1238ec1adb34aa396074e2559801c7e4314.tar.gz |
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage.reel/stage.js | 27 |
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 ); |