aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/tools/SelectionTool.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index e252e36b..aec5b6a3 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -465,11 +465,14 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
465 } 465 }
466 else 466 else
467 { 467 {
468 curMat = item.mat.slice(0); 468// curMat = item.mat.slice(0);
469 glmat4.multiply(curMat, qMat, curMat); 469// glmat4.multiply(curMat, qMat, curMat);
470 var previousMat = this._undoArray[i].mat.slice(0); 470// var previousMat = this._undoArray[i].mat.slice(0);
471 var _x = parseInt(ElementsMediator.getProperty(elt, "left")) + curMat[12] - previousMat[12]; 471// var _x = parseInt(ElementsMediator.getProperty(elt, "left")) + curMat[12] - previousMat[12];
472 var _y = parseInt(ElementsMediator.getProperty(elt, "top")) + curMat[13] - previousMat[13]; 472// var _y = parseInt(ElementsMediator.getProperty(elt, "top")) + curMat[13] - previousMat[13];
473
474 var _x = parseInt(ElementsMediator.getProperty(elt, "left")) + transMat[12];
475 var _y = parseInt(ElementsMediator.getProperty(elt, "top")) + transMat[13];
473 476
474 newLeft.push(_x + "px"); 477 newLeft.push(_x + "px");
475 newTop.push(_y + "px"); 478 newTop.push(_y + "px");
@@ -582,6 +585,8 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
582 { 585 {
583 // form the translation vector and post translate the matrix by it. 586 // form the translation vector and post translate the matrix by it.
584 delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 ); 587 delta = vecUtils.vecSubtract( 3, data.pt1, data.pt0 );
588 delta[0] = ~~delta[0];
589 delta[1] = ~~delta[1];
585 delta[2] = 0; 590 delta[2] = 0;
586 var transMat = Matrix.Translation( delta ); 591 var transMat = Matrix.Translation( delta );
587 this._moveElements(transMat); 592 this._moveElements(transMat);