diff options
author | Nivesh Rajbhandari | 2012-08-08 15:02:19 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-08-08 15:02:19 -0700 |
commit | 74cda8443e4f3c6f3e29b5bf99c3615339a982a3 (patch) | |
tree | 149385f4d93713219ff441901f5521f92d8e09d8 /js/tools/Translate3DToolBase.js | |
parent | 91c440a04f0108d05e663d1696027ca5601b25bc (diff) | |
download | ninja-74cda8443e4f3c6f3e29b5bf99c3615339a982a3.tar.gz |
IKNinja_1892 - [3D] Multiple objects fly off screen when translating in Z-axis.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/tools/Translate3DToolBase.js')
-rwxr-xr-x | js/tools/Translate3DToolBase.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/tools/Translate3DToolBase.js b/js/tools/Translate3DToolBase.js index b5008666..fd275a8a 100755 --- a/js/tools/Translate3DToolBase.js +++ b/js/tools/Translate3DToolBase.js | |||
@@ -166,7 +166,7 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase, | |||
166 | 166 | ||
167 | var len = selectedElements.length, | 167 | var len = selectedElements.length, |
168 | self = this, | 168 | self = this, |
169 | target = selectedElements[0], | 169 | target = this.clickedObject, |
170 | curMat = viewUtils.getMatrixFromElement( target ), | 170 | curMat = viewUtils.getMatrixFromElement( target ), |
171 | matInv = glmat4.inverse(this._startMat, []), | 171 | matInv = glmat4.inverse(this._startMat, []), |
172 | nMat = glmat4.multiply(transMat, this._startMat, [] ); | 172 | nMat = glmat4.multiply(transMat, this._startMat, [] ); |
@@ -180,7 +180,7 @@ exports.Translate3DToolBase = Montage.create(ModifierToolBase, | |||
180 | 180 | ||
181 | var shouldUpdateStartMat = true; | 181 | var shouldUpdateStartMat = true; |
182 | 182 | ||
183 | if(this._clickedOnStage || ((this._handleMode === 2) && (len > 1))) | 183 | if(this._clickedOnStage || ((this._handleMode !== null) && (len > 1))) |
184 | { | 184 | { |
185 | shouldUpdateStartMat = false; | 185 | shouldUpdateStartMat = false; |
186 | } | 186 | } |