aboutsummaryrefslogtreecommitdiff
path: root/js/tools/Rotate3DToolBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools/Rotate3DToolBase.js')
-rwxr-xr-xjs/tools/Rotate3DToolBase.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/js/tools/Rotate3DToolBase.js b/js/tools/Rotate3DToolBase.js
index 402023ff..e65dc842 100755
--- a/js/tools/Rotate3DToolBase.js
+++ b/js/tools/Rotate3DToolBase.js
@@ -536,24 +536,23 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
536 value : function() 536 value : function()
537 { 537 {
538 var item, 538 var item,
539 elt,
540 mat, 539 mat,
541 dist, 540 dist,
542 newStyles = [], 541 newStyles = [],
543 previousStyles = [], 542 previousStyles = [],
544 len = this._targets.length, 543 len = this.application.ninja.selectedElements.length,
545 iMat; 544 iMat;
546 for(var i = 0; i < len; i++) 545 for(var i = 0; i < len; i++)
547 { 546 {
548 // Reset to the identity matrix 547 // Reset to the identity matrix
549 item = this._targets[i]; 548 item = this.application.ninja.selectedElements[i];
550 iMat = Matrix.I(4); 549 iMat = Matrix.I(4);
551 mat = item.mat; 550 mat = ElementsMediator.getMatrix(item);
552// iMat[12] = mat[12]; 551// iMat[12] = mat[12];
553// iMat[13] = mat[13]; 552// iMat[13] = mat[13];
554// iMat[14] = mat[14]; 553// iMat[14] = mat[14];
555 554
556 dist = this._undoArray[i].dist; 555 dist = ElementsMediator.getPerspectiveDist(item);
557 556
558 var previousStyleStr = {dist:dist, mat:mat}; 557 var previousStyleStr = {dist:dist, mat:mat};
559 558
@@ -574,8 +573,10 @@ exports.Rotate3DToolBase = Montage.create(ModifierToolBase, {
574 this.isDrawing = false; 573 this.isDrawing = false;
575 this.endDraw(event); 574 this.endDraw(event);
576 575
577// this.UpdateSelection(true); 576 // Need to force stage to draw immediately so the new selection center is calculated
578 this.Configure(true); 577 this.application.ninja.stage.draw();
578 // And captureSelectionDrawn to draw the transform handles
579 this.captureSelectionDrawn(null);
579 } 580 }
580 }, 581 },
581 582