diff options
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-x | js/tools/SelectionTool.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js index 414f9d11..07c26b8c 100755 --- a/js/tools/SelectionTool.js +++ b/js/tools/SelectionTool.js | |||
@@ -221,10 +221,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
221 | HandleDoubleClick: { | 221 | HandleDoubleClick: { |
222 | value: function(event) { | 222 | value: function(event) { |
223 | if(this.application.ninja.selectedElements.length > 0) { | 223 | if(this.application.ninja.selectedElements.length > 0) { |
224 | // this.application.ninja.currentDocument.breadCrumbClick = true; | ||
225 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; | 224 | this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0]; |
226 | } else { | 225 | } else { |
227 | // this.application.ninja.currentDocument.breadCrumbClick = true; | ||
228 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; | 226 | this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; |
229 | } | 227 | } |
230 | } | 228 | } |
@@ -506,7 +504,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
506 | delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); | 504 | delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); |
507 | delta[0] = ~~delta[0]; | 505 | delta[0] = ~~delta[0]; |
508 | delta[1] = ~~delta[1]; | 506 | delta[1] = ~~delta[1]; |
509 | delta[2] = 0; | 507 | //delta[2] = 0; |
510 | var transMat = Matrix.Translation( delta ); | 508 | var transMat = Matrix.Translation( delta ); |
511 | this._moveElements(transMat); | 509 | this._moveElements(transMat); |
512 | } | 510 | } |
@@ -753,10 +751,10 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
753 | 751 | ||
754 | var zoomFactor = 1; | 752 | var zoomFactor = 1; |
755 | var viewPort = this.application.ninja.stage._viewport; | 753 | var viewPort = this.application.ninja.stage._viewport; |
756 | if (viewPort.style && viewPort.style.zoom) | 754 | if (viewPort && viewPort.style && viewPort.style.zoom) { |
757 | { | ||
758 | zoomFactor = Number(viewPort.style.zoom); | 755 | zoomFactor = Number(viewPort.style.zoom); |
759 | } | 756 | } |
757 | |||
760 | var tmpMat = viewUtils.getLocalToGlobalMatrix( item ); | 758 | var tmpMat = viewUtils.getLocalToGlobalMatrix( item ); |
761 | for (var j=0; j<4; j++) | 759 | for (var j=0; j<4; j++) |
762 | { | 760 | { |
@@ -865,7 +863,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, { | |||
865 | 863 | ||
866 | var zoomFactor = 1; | 864 | var zoomFactor = 1; |
867 | var viewPort = this.application.ninja.stage._viewport; | 865 | var viewPort = this.application.ninja.stage._viewport; |
868 | if (viewPort.style && viewPort.style.zoom) | 866 | if (viewPort && viewPort.style && viewPort.style.zoom) |
869 | { | 867 | { |
870 | zoomFactor = Number(viewPort.style.zoom); | 868 | zoomFactor = Number(viewPort.style.zoom); |
871 | } | 869 | } |