aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-xjs/tools/SelectionTool.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 9c9aee93..855c7b8c 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -222,10 +222,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
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.currentSelectedContainer = this.application.ninja.selectedElements[0]; 224 this.application.ninja.currentSelectedContainer = this.application.ninja.selectedElements[0];
225 console.log( "setting container to selected element" );
226 } else { 225 } else {
227 this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot; 226 this.application.ninja.currentSelectedContainer = this.application.ninja.currentDocument.documentRoot;
228 console.log( "setting container to stage" );
229 } 227 }
230 } 228 }
231 }, 229 },
@@ -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 }