diff options
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 | ||