diff options
Diffstat (limited to 'js/tools/drawing-tool-base.js')
-rwxr-xr-x | js/tools/drawing-tool-base.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/tools/drawing-tool-base.js b/js/tools/drawing-tool-base.js index 0a3767b5..3549de1c 100755 --- a/js/tools/drawing-tool-base.js +++ b/js/tools/drawing-tool-base.js | |||
@@ -154,8 +154,8 @@ exports.DrawingToolBase = Montage.create(Component, { | |||
154 | // get the hit rec. points in plane space | 154 | // get the hit rec. points in plane space |
155 | var psPos = hitRec.getLocalPoint(); | 155 | var psPos = hitRec.getLocalPoint(); |
156 | 156 | ||
157 | var stageOffset = viewUtils.getElementOffset(this.application.ninja.currentDocument.documentRoot); | 157 | var stageOffset = viewUtils.getElementOffset(this.application.ninja.currentDocument.model.documentRoot); |
158 | viewUtils.setViewportObj(this.application.ninja.currentDocument.documentRoot); | 158 | viewUtils.setViewportObj(this.application.ninja.currentDocument.model.documentRoot); |
159 | 159 | ||
160 | // get the matrix taking the local hit point in plane space | 160 | // get the matrix taking the local hit point in plane space |
161 | // to world space of whatever element it is in. | 161 | // to world space of whatever element it is in. |
@@ -183,8 +183,8 @@ exports.DrawingToolBase = Montage.create(Component, { | |||
183 | var p0 = hitRec0.getLocalPoint(), | 183 | var p0 = hitRec0.getLocalPoint(), |
184 | p1 = hitRec1.getLocalPoint(); | 184 | p1 = hitRec1.getLocalPoint(); |
185 | 185 | ||
186 | var stageOffset = viewUtils.getElementOffset(this.application.ninja.currentDocument.documentRoot); | 186 | var stageOffset = viewUtils.getElementOffset(this.application.ninja.currentDocument.model.documentRoot); |
187 | viewUtils.setViewportObj(this.application.ninja.currentDocument.documentRoot); | 187 | viewUtils.setViewportObj(this.application.ninja.currentDocument.model.documentRoot); |
188 | 188 | ||
189 | // get the matrix taking the local hit point in plane space | 189 | // get the matrix taking the local hit point in plane space |
190 | // to world space of whatever element it is in. | 190 | // to world space of whatever element it is in. |
@@ -308,10 +308,10 @@ exports.DrawingToolBase = Montage.create(Component, { | |||
308 | var p0 = hitRec0.getLocalPoint(), | 308 | var p0 = hitRec0.getLocalPoint(), |
309 | p1 = hitRec1.getLocalPoint(); | 309 | p1 = hitRec1.getLocalPoint(); |
310 | 310 | ||
311 | var stageMat = viewUtils.getMatrixFromElement(this.application.ninja.currentDocument.documentRoot); | 311 | var stageMat = viewUtils.getMatrixFromElement(this.application.ninja.currentDocument.model.documentRoot); |
312 | var elt = hitRec0.getElt(); | 312 | var elt = hitRec0.getElt(); |
313 | if (!elt) { elt = hitRec1.getElt(); } | 313 | if (!elt) { elt = hitRec1.getElt(); } |
314 | if (!elt) { elt = this.application.ninja.currentDocument.documentRoot; } | 314 | if (!elt) { elt = this.application.ninja.currentDocument.model.documentRoot; } |
315 | if (elt) | 315 | if (elt) |
316 | { | 316 | { |
317 | viewUtils.pushViewportObj(elt); | 317 | viewUtils.pushViewportObj(elt); |