diff options
author | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-09 14:35:44 -0700 |
commit | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (patch) | |
tree | 3f56cbed2f08c5a81ea79eaf0bcb9bd031d8a627 /js/tools/SelectionTool.js | |
parent | c0a42c56f768a873ba637f5b86d5f6a84d4a3312 (diff) | |
parent | 40c6eb2c06b34f65a74d59ef9687251952858bab (diff) | |
download | ninja-84b3327bd92faafab7954b5eb64c7abe24a3fe13.tar.gz |
Merge branch 'normalize' of https://github.com/kriskowal/ninja-internal
Conflicts:
js/components/gradientpicker.reel/gradientpicker.js
js/components/tools-properties/text-properties.reel/text-properties.js
js/document/views/base.js
js/document/views/design.js
js/helper-classes/3D/StageLine.js
js/helper-classes/3D/draw-utils.js
js/lib/drawing/world.js
js/lib/geom/circle.js
js/lib/geom/line.js
js/lib/geom/rectangle.js
js/lib/geom/shape-primitive.js
js/lib/rdge/materials/bump-metal-material.js
js/lib/rdge/materials/flag-material.js
js/lib/rdge/materials/fly-material.js
js/lib/rdge/materials/julia-material.js
js/lib/rdge/materials/keleidoscope-material.js
js/lib/rdge/materials/mandel-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/plasma-material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/radial-gradient-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/water-material.js
js/panels/Materials/materials-library-panel.reel/materials-library-panel.html
js/panels/Materials/materials-library-panel.reel/materials-library-panel.js
js/panels/Materials/materials-popup.reel/materials-popup.html
js/panels/Materials/materials-popup.reel/materials-popup.js
js/tools/LineTool.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/SelectionTool.js')
-rwxr-xr-x | js/tools/SelectionTool.js | 70 |
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 | ||