diff options
author | Valerio Virgillito | 2012-05-11 10:59:25 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-11 10:59:25 -0700 |
commit | e2ef92008a39a67d4f7db0627c7352bdc06ed476 (patch) | |
tree | ae6122570b41879b5fa434c970592fe1deb23a2e /js/tools/LineTool.js | |
parent | 632a53278826a33506b302b573ee0681840f2d6c (diff) | |
parent | 0467a1cf331c067b21bf5d6acfe47ec9edc2e41c (diff) | |
download | ninja-e2ef92008a39a67d4f7db0627c7352bdc06ed476.tar.gz |
Merge pull request #215 from mqg734/WebGLFixes
Updated Line, Oval and Rectangle geom classes to use object literal notation. Also, updated canvas-runtime.js to use object literal notation.
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-x | js/tools/LineTool.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js index 5941b464..198d7e69 100755 --- a/js/tools/LineTool.js +++ b/js/tools/LineTool.js | |||
@@ -234,7 +234,8 @@ exports.LineTool = Montage.create(ShapeTool, { | |||
234 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); | 234 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); |
235 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); | 235 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); |
236 | 236 | ||
237 | var line = new Line(world, xOffset, yOffset, w, h, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj); | 237 | var line = Object.create(Line, {}); |
238 | line.init(world, xOffset, yOffset, w, h, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj); | ||
238 | 239 | ||
239 | world.addObject(line); | 240 | world.addObject(line); |
240 | world.render(); | 241 | world.render(); |