diff options
author | Nivesh Rajbhandari | 2012-05-29 10:26:19 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-29 10:26:19 -0700 |
commit | 42c2a480a3883389e47d4ec291dfb55d99cf4b7f (patch) | |
tree | dbb031822e2409c4bf7d5223dce7c1123b4bc559 /js/helper-classes/3D | |
parent | fa50874d9ca03540dc5741fb51261ef2b56f89ea (diff) | |
download | ninja-42c2a480a3883389e47d4ec291dfb55d99cf4b7f.tar.gz |
Cache perspective distance lookup to speed up user interaction.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/view-utils.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index a3d09404..3c7ae6ff 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js | |||
@@ -195,7 +195,12 @@ exports.ViewUtils = Montage.create(Component, { | |||
195 | 195 | ||
196 | getPerspectiveDistFromElement: { | 196 | getPerspectiveDistFromElement: { |
197 | value: function( elt ) { | 197 | value: function( elt ) { |
198 | return ElementsMediator.getPerspectiveDist(elt); | 198 | var pDist = ElementsMediator.getPerspectiveDist(elt); |
199 | if(pDist === "none") { | ||
200 | return null; | ||
201 | } else { | ||
202 | return pDist; | ||
203 | } | ||
199 | } | 204 | } |
200 | }, | 205 | }, |
201 | 206 | ||
@@ -1320,14 +1325,6 @@ exports.ViewUtils = Montage.create(Component, { | |||
1320 | } | 1325 | } |
1321 | }, | 1326 | }, |
1322 | 1327 | ||
1323 | getCurrentDocument: | ||
1324 | { | ||
1325 | value: function() | ||
1326 | { | ||
1327 | return snapManagerModule.SnapManager.application.ninja.currentDocument; | ||
1328 | } | ||
1329 | }, | ||
1330 | |||
1331 | setStageZoom: { | 1328 | setStageZoom: { |
1332 | value:function( globalPt, zoomFactor ) { | 1329 | value:function( globalPt, zoomFactor ) { |
1333 | var localPt; | 1330 | var localPt; |