Correct triangle display with images
authorymh <ymh.work@gmail.com>
Wed, 10 Jun 2015 14:27:12 +0200
changeset 467 fd2b5a7ec356
parent 466 884b35feb04b
child 468 364c367df7fc
child 475 e3537f6de112
Correct triangle display with images
client/js/renderer/shapebuilder.js
--- a/client/js/renderer/shapebuilder.js	Wed Jun 10 12:46:28 2015 +0200
+++ b/client/js/renderer/shapebuilder.js	Wed Jun 10 14:27:12 2015 +0200
@@ -76,7 +76,10 @@
                 return new paper.Path.RegularPolygon([0,0], 3, 1);
             },
             getImageShape: function(center, radius) {
-                return new paper.Path.RegularPolygon(center, 3, radius);
+                var shape = new paper.Path.RegularPolygon([0,0], 3, 1);
+                shape.scale(radius);
+                shape.translate(center);
+                return shape;
             }
         },
         "svg": function(path){