aboutsummaryrefslogtreecommitdiff
path: root/js/tools/SelectionTool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-xjs/tools/SelectionTool.js70
1 files changed, 35 insertions, 35 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 03208dfe..042d2573 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -201,9 +201,9 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
201 selectedItems = []; 201 selectedItems = [];
202 202
203 box[0] = this.downPoint.x; 203 box[0] = this.downPoint.x;
204 box[1] = this.downPoint.y; 204 box[1] = this.downPoint.y;
205 box[2] = point.x; 205 box[2] = point.x;
206 box[3] = point.y; 206 box[3] = point.y;
207 207
208 //selectionManagerModule.selectionManager.marqueeSelection(box); 208 //selectionManagerModule.selectionManager.marqueeSelection(box);
209 var childNodes = this.application.ninja.currentDocument.model.documentRoot.childNodes, 209 var childNodes = this.application.ninja.currentDocument.model.documentRoot.childNodes,
@@ -403,11 +403,11 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
403 }, 403 },
404 404
405 _moveElements: { 405 _moveElements: {
406 value: function (transMat) { 406 value: function (transMat) {
407 var elt, curMat, targets = []; 407 var elt, curMat, targets = [];
408 408
409// var matInv = glmat4.inverse(this._startMat, []); 409// var matInv = glmat4.inverse(this._startMat, []);
410// var qMat = glmat4.multiply(matInv, nMat, []); 410// var qMat = glmat4.multiply(matInv, nMat, []);
411 this._startMat = glmat4.multiply(transMat, this._startMat, [] ); 411 this._startMat = glmat4.multiply(transMat, this._startMat, [] );
412 412
413 var self = this; 413 var self = this;
@@ -434,8 +434,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
434 } else { 434 } else {
435 ElementsMediator.setProperties(targets, "Changing", "SelectionTool" ); 435 ElementsMediator.setProperties(targets, "Changing", "SelectionTool" );
436 } 436 }
437 } 437 }
438 }, 438 },
439 439
440 //------------------------------------------------------------------------- 440 //-------------------------------------------------------------------------
441 //Routines to modify the selected objects 441 //Routines to modify the selected objects
@@ -630,17 +630,17 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
630 }, 630 },
631 631
632 /* 632 /*
633 * The parameterization is based on the position of the 633 * The parameterization is based on the position of the
634 * snap point in pre-transformed element screen space 634 * snap point in pre-transformed element screen space
635 */ 635 */
636 parameterizeSnap: 636 parameterizeSnap:
637 { 637 {
638 value: function( hitRec ) 638 value: function( hitRec )
639 { 639 {
640 var paramPt = [0,0,0]; 640 var paramPt = [0,0,0];
641 var elt = this._getObjectBeingTracked(hitRec); 641 var elt = this._getObjectBeingTracked(hitRec);
642 if (elt) 642 if (elt)
643 { 643 {
644 this.clickedObject = elt; 644 this.clickedObject = elt;
645 if(this._handleMode === null) 645 if(this._handleMode === null)
646 { 646 {
@@ -701,11 +701,11 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
701 break; 701 break;
702 } 702 }
703 } 703 }
704 } 704 }
705 705
706 return paramPt; 706 return paramPt;
707 } 707 }
708 }, 708 },
709 709
710 /** 710 /**
711 * This function is for specifying custom feedback routine 711 * This function is for specifying custom feedback routine
@@ -987,23 +987,23 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
987 // TODO : Use the new element mediator to get element offsets 987 // TODO : Use the new element mediator to get element offsets
988 _complicatedCollisionDetection: { 988 _complicatedCollisionDetection: {
989 value: function(elt, box) 989 value: function(elt, box)
990 { 990 {
991 var left, top, width, height; 991 var left, top, width, height;
992 992
993 left = box[0]; 993 left = box[0];
994 width = box[2] - left; 994 width = box[2] - left;
995 if (width < 0) 995 if (width < 0)
996 { 996 {
997 left = box[2]; 997 left = box[2];
998 width = -width; 998 width = -width;
999 } 999 }
1000 top = box[1]; 1000 top = box[1];
1001 height = box[3] - top; 1001 height = box[3] - top;
1002 if (height < 0) 1002 if (height < 0)
1003 { 1003 {
1004 top = box[3]; 1004 top = box[3];
1005 height = -height; 1005 height = -height;
1006 } 1006 }
1007 1007
1008 var rtnVal = MathUtils.rectsOverlap( [left,top], width, height, elt ); 1008 var rtnVal = MathUtils.rectsOverlap( [left,top], width, height, elt );
1009 1009