diff options
Diffstat (limited to 'js/helper-classes/3D/draw-utils.js')
-rwxr-xr-x | js/helper-classes/3D/draw-utils.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index 871b832d..c98ad8bc 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js | |||
@@ -126,7 +126,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
126 | //initialize with current document | 126 | //initialize with current document |
127 | this._eltArray = []; | 127 | this._eltArray = []; |
128 | this._planesArray = []; | 128 | this._planesArray = []; |
129 | this.setDrawingSurfaceElement(stage.canvas); | 129 | this.setDrawingSurfaceElement(stage.gridCanvas); |
130 | this.setSourceSpaceElement( this.application.ninja.currentDocument.model.documentRoot); | 130 | this.setSourceSpaceElement( this.application.ninja.currentDocument.model.documentRoot); |
131 | this.setWorkingPlane( [0,0,1,0] ); | 131 | this.setWorkingPlane( [0,0,1,0] ); |
132 | 132 | ||
@@ -276,8 +276,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
276 | stage = this.application.ninja.stage, | 276 | stage = this.application.ninja.stage, |
277 | minLeft = stage.userPaddingLeft, | 277 | minLeft = stage.userPaddingLeft, |
278 | minTop = stage.userPaddingTop, | 278 | minTop = stage.userPaddingTop, |
279 | docLeft = stage.documentOffsetLeft, | 279 | docLeft = stage.userContentLeft, |
280 | docTop = stage.documentOffsetTop, | 280 | docTop = stage.userContentTop, |
281 | l, | 281 | l, |
282 | t, | 282 | t, |
283 | plane, | 283 | plane, |
@@ -307,7 +307,6 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
307 | } | 307 | } |
308 | 308 | ||
309 | if(!changed) { | 309 | if(!changed) { |
310 | stage.layout.draw(); | ||
311 | this.drawWorkingPlane(); | 310 | this.drawWorkingPlane(); |
312 | this.draw3DCompass(); | 311 | this.draw3DCompass(); |
313 | } | 312 | } |
@@ -628,11 +627,11 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { | |||
628 | { | 627 | { |
629 | value: function () | 628 | value: function () |
630 | { | 629 | { |
630 | this.application.ninja.stage.clearGridCanvas(); | ||
631 | if (!this.isDrawingGrid()) return; | 631 | if (!this.isDrawingGrid()) return; |
632 | 632 | ||
633 | var saveContext = this.getDrawingSurfaceElement(); | 633 | var saveContext = this.getDrawingSurfaceElement(); |
634 | //this.setDrawingSurfaceElement(window.stageManager.layoutCanvas); | 634 | this.setDrawingSurfaceElement(this.application.ninja.stage.gridCanvas); |
635 | this.setDrawingSurfaceElement(this.application.ninja.stage.layoutCanvas); | ||
636 | 635 | ||
637 | // 3 coordinate axes for the plane | 636 | // 3 coordinate axes for the plane |
638 | var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; | 637 | var zAxis = [this._workingPlane[0], this._workingPlane[1], this._workingPlane[2]]; |