diff options
author | Jose Antonio Marquez | 2012-06-26 11:01:51 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-26 11:01:51 -0700 |
commit | 879dc3285feef07bc532d3f51fdb8cdba8048313 (patch) | |
tree | 59c66dd62e20d2a1f01a284564d82e66d62f7ca3 /js/tools | |
parent | dde59258c3979b990913ad1f14b0e55828a38906 (diff) | |
parent | dea90d1bb0b903a7497cdf7de9ae60799e60d5b1 (diff) | |
download | ninja-879dc3285feef07bc532d3f51fdb8cdba8048313.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Color
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/PanTool.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/tools/PanTool.js b/js/tools/PanTool.js index a8911c0c..fce8a7d7 100755 --- a/js/tools/PanTool.js +++ b/js/tools/PanTool.js | |||
@@ -47,8 +47,8 @@ exports.PanTool = Montage.create(toolBase, | |||
47 | HandleLeftButtonDown: { | 47 | HandleLeftButtonDown: { |
48 | value : function ( event ) { | 48 | value : function ( event ) { |
49 | // Determine the maximum horizontal and vertical scroll values | 49 | // Determine the maximum horizontal and vertical scroll values |
50 | this._maxHorizontalScroll = this.application.ninja.currentDocument.model.documentRoot.scrollWidth - this.application.ninja.stage._canvas.width - 11; | 50 | this._maxHorizontalScroll = this.application.ninja.currentDocument.model.views.design.document.body.scrollWidth - this.application.ninja.stage._canvas.width - 11; |
51 | this._maxVerticalScroll = this.application.ninja.currentDocument.model.documentRoot.scrollHeight - this.application.ninja.stage._canvas.height - 11; | 51 | this._maxVerticalScroll = this.application.ninja.currentDocument.model.views.design.document.body.scrollHeight - this.application.ninja.stage._canvas.height - 11; |
52 | if((this._maxHorizontalScroll > 0) || (this._maxVerticalScroll > 0) || this._altKeyDown) | 52 | if((this._maxHorizontalScroll > 0) || (this._maxVerticalScroll > 0) || this._altKeyDown) |
53 | { | 53 | { |
54 | this._isDrawing = true; | 54 | this._isDrawing = true; |
@@ -239,6 +239,8 @@ exports.PanTool = Montage.create(toolBase, | |||
239 | this._localPt = [cop[0] + localPt[0], cop[1] + localPt[1], localPt[2]]; | 239 | this._localPt = [cop[0] + localPt[0], cop[1] + localPt[1], localPt[2]]; |
240 | viewUtils.popViewportObj(); | 240 | viewUtils.popViewportObj(); |
241 | } | 241 | } |
242 | this._localPt[0] = Math.round(this._localPt[0]); | ||
243 | this._localPt[1] = Math.round(this._localPt[1]); | ||
242 | this._globalPt = MathUtils.transformAndDivideHomogeneousPoint( this._localPt, localToGlobalMat ); | 244 | this._globalPt = MathUtils.transformAndDivideHomogeneousPoint( this._localPt, localToGlobalMat ); |
243 | var tmpLocal = MathUtils.transformAndDivideHomogeneousPoint( this._globalPt, globalToLocalMat ); | 245 | var tmpLocal = MathUtils.transformAndDivideHomogeneousPoint( this._globalPt, globalToLocalMat ); |
244 | 246 | ||