diff options
author | Nivesh Rajbhandari | 2012-05-29 10:35:06 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-05-29 10:35:06 -0700 |
commit | 2fd6db5f46208a5aa8fa58d090f795e5b7eb99bb (patch) | |
tree | 54846284f7164b3fc84ca454a7075460186e3d09 /js/helper-classes/3D/snap-manager.js | |
parent | 42c2a480a3883389e47d4ec291dfb55d99cf4b7f (diff) | |
download | ninja-2fd6db5f46208a5aa8fa58d090f795e5b7eb99bb.tar.gz |
Sped up user-interaction by moving grid drawing into its own canvas so the layout code doesn't have to be run when modifying selected elements.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 069c6022..4dcda24a 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -21,8 +21,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
21 | /////////////////////////////////////////////////////////////////////// | 21 | /////////////////////////////////////////////////////////////////////// |
22 | // Instance variables | 22 | // Instance variables |
23 | /////////////////////////////////////////////////////////////////////// | 23 | /////////////////////////////////////////////////////////////////////// |
24 | drawingCanvas: { value: null, writable: true}, | 24 | |
25 | |||
26 | // we keep a stack of working planes to facilitate working on other planes temporarily | 25 | // we keep a stack of working planes to facilitate working on other planes temporarily |
27 | _workingPlaneStack : { value: [], writable: true }, | 26 | _workingPlaneStack : { value: [], writable: true }, |
28 | 27 | ||
@@ -2124,7 +2123,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
2124 | if (hitRec) | 2123 | if (hitRec) |
2125 | { | 2124 | { |
2126 | var saveContext = drawUtils.getDrawingSurfaceElement(); | 2125 | var saveContext = drawUtils.getDrawingSurfaceElement(); |
2127 | drawUtils.setDrawingSurfaceElement(this.drawingCanvas); | 2126 | drawUtils.setDrawingSurfaceElement(this.application.ninja.stage.drawingCanvas); |
2128 | var context = drawUtils.getDrawingContext(); | 2127 | var context = drawUtils.getDrawingContext(); |
2129 | if (context) | 2128 | if (context) |
2130 | { | 2129 | { |