aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-05-07 16:30:19 -0700
committerJohn Mayhew2012-05-07 16:30:19 -0700
commitdb4ba95f50148198759dde503ec1c778184d9dbe (patch)
tree8b79ad58108af2f17d15abc8cdc33d35229ab20d /js/tools/SelectionTool.js
parent843d8ea8ee58a54bcb71d7b28dbf78fae153b491 (diff)
parent526e423e4a2734c2b139af23911e912452a4443f (diff)
downloadninja-db4ba95f50148198759dde503ec1c778184d9dbe.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/components/layout/tools-list.reel/tools-list.html js/components/layout/tools-properties.reel/tools-properties.html js/components/tools-properties/brush-properties.reel/brush-properties.html js/components/tools-properties/fill-properties.reel/fill-properties.html js/components/tools-properties/pen-properties.reel/pen-properties.html js/components/tools-properties/pencil-properties.reel/pencil-properties.html js/components/tools-properties/selection-properties.reel/selection-properties.html js/components/tools-properties/shape-properties.reel/shape-properties.html js/components/tools-properties/tag-properties.reel/tag-properties.html js/components/tools-properties/text-properties.reel/text-properties.html
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 }