diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:21 -0700 |
commit | d14f78b06d37aa469885f2ecf84419bcb7e3e613 (patch) | |
tree | 91b95c6c9aef779a743b710105546a8ae74bff12 /js/tools/Rotate3DToolBase.js | |
parent | a9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-d14f78b06d37aa469885f2ecf84419bcb7e3e613.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/tools/Rotate3DToolBase.js')
-rwxr-xr-x | js/tools/Rotate3DToolBase.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js index eb2cdba4..696408bf 100755 --- a/js/tools/Rotate3DToolBase.js +++ b/js/tools/Rotate3DToolBase.js | |||
@@ -438,24 +438,23 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, { | |||
438 | value : function() | 438 | value : function() |
439 | { | 439 | { |
440 | var item, | 440 | var item, |
441 | elt, | ||
442 | mat, | 441 | mat, |
443 | dist, | 442 | dist, |
444 | newStyles = [], | 443 | newStyles = [], |
445 | previousStyles = [], | 444 | previousStyles = [], |
446 | len = this._targets.length, | 445 | len = this.application.ninja.selectedElements.length, |
447 | iMat; | 446 | iMat; |
448 | for(var i = 0; i < len; i++) | 447 | for(var i = 0; i < len; i++) |
449 | { | 448 | { |
450 | // Reset to the identity matrix | 449 | // Reset to the identity matrix |
451 | item = this._targets[i]; | 450 | item = this.application.ninja.selectedElements[i]; |
452 | iMat = Matrix.I(4); | 451 | iMat = Matrix.I(4); |
453 | mat = item.mat; | 452 | mat = ElementsMediator.getMatrix(item); |
454 | // iMat[12] = mat[12]; | 453 | // iMat[12] = mat[12]; |
455 | // iMat[13] = mat[13]; | 454 | // iMat[13] = mat[13]; |
456 | // iMat[14] = mat[14]; | 455 | // iMat[14] = mat[14]; |
457 | 456 | ||
458 | dist = this._undoArray[i].dist; | 457 | dist = ElementsMediator.getPerspectiveDist(item); |
459 | 458 | ||
460 | var previousStyleStr = {dist:dist, mat:mat}; | 459 | var previousStyleStr = {dist:dist, mat:mat}; |
461 | 460 | ||
@@ -476,8 +475,10 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, { | |||
476 | this.isDrawing = false; | 475 | this.isDrawing = false; |
477 | this.endDraw(event); | 476 | this.endDraw(event); |
478 | 477 | ||
479 | // this.UpdateSelection(true); | 478 | // Need to force stage to draw immediately so the new selection center is calculated |
480 | this.Configure(true); | 479 | this.application.ninja.stage.draw(); |
480 | // And captureSelectionDrawn to draw the transform handles | ||
481 | this.captureSelectionDrawn(null); | ||
481 | } | 482 | } |
482 | }, | 483 | }, |
483 | 484 | ||