diff options
author | Valerio Virgillito | 2012-05-03 23:08:31 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-03 23:08:31 -0700 |
commit | 3542dab96689a54f97fff6fc654838c07c724517 (patch) | |
tree | 1c8a8a53985bb72a34ad302e402ffe24aec2f242 /js/tools/LineTool.js | |
parent | 24b483db367291b72170f969de78efcb1a9b95bd (diff) | |
parent | 60388a7d01d9e34b5cd15bd5cb190a610e4f9a0e (diff) | |
download | ninja-3542dab96689a54f97fff6fc654838c07c724517.tar.gz |
Merge branch 'tag-2.0' of github.com:mencio/ninja-internal into data-id
Conflicts:
js/components/tools-properties/tag-properties.reel/tag-properties.html
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-x | js/tools/LineTool.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 3e9167fd..5941b464 100755 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -77,10 +77,11 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
77 | h += ~~(yAdj*2); | 77 | h += ~~(yAdj*2); |
78 | } | 78 | } |
79 | 79 | ||
80 | canvas = NJUtils.makeNJElement("canvas", "Canvas", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); | 80 | canvas = document.application.njUtils.make("canvas", {"data-RDGE-id": NJUtils.generateRandom()}, this.application.ninja.currentDocument); |
81 | var elementModel = TagTool.makeElement(w, h, drawData.planeMat, drawData.midPt, canvas, true); | 81 | document.application.njUtils.createModelWithShape(canvas, "Line"); |
82 | canvas.elementModel.isShape = true; | 82 | |
83 | this.application.ninja.elementMediator.addElements(canvas, elementModel.data); | 83 | var styles = document.application.njUtils.stylesFromDraw(canvas, w, h, drawData); |
84 | this.application.ninja.elementMediator.addElements(canvas, styles); | ||
84 | } else { | 85 | } else { |
85 | canvas = this._targetedElement; | 86 | canvas = this._targetedElement; |
86 | canvas.elementModel.controller = ShapesController; | 87 | canvas.elementModel.controller = ShapesController; |
@@ -241,7 +242,7 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
241 | canvas.elementModel.shapeModel.shapeCount++; | 242 | canvas.elementModel.shapeModel.shapeCount++; |
242 | if(canvas.elementModel.shapeModel.shapeCount === 1) | 243 | if(canvas.elementModel.shapeModel.shapeCount === 1) |
243 | { | 244 | { |
244 | canvas.elementModel.selection = "Line"; | 245 | // canvas.elementModel.selection = "Line"; |
245 | canvas.elementModel.pi = "LinePi"; | 246 | canvas.elementModel.pi = "LinePi"; |
246 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; | 247 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; |
247 | 248 | ||