aboutsummaryrefslogtreecommitdiff
path: root/js/tools/BrushTool.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-16 21:42:56 -0800
committerValerio Virgillito2012-02-16 21:42:56 -0800
commite0bead5a36ae987c558607b77745c4018caf59f8 (patch)
tree1303fb6b6142064f6068971549070cceb73b9e93 /js/tools/BrushTool.js
parent9e3c10d4e12e896107c8551b4e6fc1dfbaf7bda1 (diff)
downloadninja-e0bead5a36ae987c558607b77745c4018caf59f8.tar.gz
Adding a data-RDGE-id attribute to each canvas to save/load canvas data
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/BrushTool.js')
-rwxr-xr-xjs/tools/BrushTool.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/tools/BrushTool.js b/js/tools/BrushTool.js
index ce8ffbb9..4d44326f 100755
--- a/js/tools/BrushTool.js
+++ b/js/tools/BrushTool.js
@@ -201,7 +201,7 @@ exports.BrushTool = Montage.create(ShapeTool, {
201 var top = Math.round(midPt[1] - 0.5 * h); 201 var top = Math.round(midPt[1] - 0.5 * h);
202 202
203 if (!canvas) { 203 if (!canvas) {
204 var newCanvas = NJUtils.makeNJElement("canvas", "Brushstroke", "shape", null, true); 204 var newCanvas = NJUtils.makeNJElement("canvas", "Brushstroke", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true);
205 var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas); 205 var elementModel = TagTool.makeElement(w, h, planeMat, midPt, newCanvas);
206 ElementMediator.addElement(newCanvas, elementModel.data, true); 206 ElementMediator.addElement(newCanvas, elementModel.data, true);
207 207