aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
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 );