diff options
author | Pushkar Joshi | 2012-05-22 13:22:26 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-05-22 13:22:26 -0700 |
commit | 01dbc1f329a95bc7e3b93224543d88ad5bdbd315 (patch) | |
tree | ceb527713554f506c537168e36a10452cd09ad10 /js/tools/SelectionTool.js | |
parent | b9262c831952e77135b79c2de7c455d5e7ff0589 (diff) | |
parent | c37a876b373ddc7cb19277aaeaa6bb2d2d5a50ac (diff) | |
download | ninja-01dbc1f329a95bc7e3b93224543d88ad5bdbd315.tar.gz |
Merge branch 'master' into brushtool
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-x | js/tools/SelectionTool.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 7033ee3d..07c26b8c 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js | |||
@@ -504,7 +504,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
504 | delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); | 504 | delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); |
505 | delta[0] = ~~delta[0]; | 505 | delta[0] = ~~delta[0]; |
506 | delta[1] = ~~delta[1]; | 506 | delta[1] = ~~delta[1]; |
507 | delta[2] = 0; | 507 | //delta[2] = 0; |
508 | var transMat = Matrix.Translation( delta ); | 508 | var transMat = Matrix.Translation( delta ); |
509 | this._moveElements(transMat); | 509 | this._moveElements(transMat); |
510 | } | 510 | } |
@@ -751,10 +751,10 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
751 | 751 | ||
752 | var zoomFactor = 1; | 752 | var zoomFactor = 1; |
753 | var viewPort = this.application.ninja.stage._viewport; | 753 | var viewPort = this.application.ninja.stage._viewport; |
754 | if (viewPort.style && viewPort.style.zoom) | 754 | if (viewPort && viewPort.style && viewPort.style.zoom) { |
755 | { | ||
756 | zoomFactor = Number(viewPort.style.zoom); | 755 | zoomFactor = Number(viewPort.style.zoom); |
757 | } | 756 | } |
757 | |||
758 | var tmpMat = viewUtils.getLocalToGlobalMatrix( item ); | 758 | var tmpMat = viewUtils.getLocalToGlobalMatrix( item ); |
759 | for (var j=0; j<4; j++) | 759 | for (var j=0; j<4; j++) |
760 | { | 760 | { |
@@ -863,7 +863,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
863 | 863 | ||
864 | var zoomFactor = 1; | 864 | var zoomFactor = 1; |
865 | var viewPort = this.application.ninja.stage._viewport; | 865 | var viewPort = this.application.ninja.stage._viewport; |
866 | if (viewPort.style && viewPort.style.zoom) | 866 | if (viewPort && viewPort.style && viewPort.style.zoom) |
867 | { | 867 | { |
868 | zoomFactor = Number(viewPort.style.zoom); | 868 | zoomFactor = Number(viewPort.style.zoom); |
869 | } | 869 | } |