javascript - How can I find an object with fabricjs -
i have circles on webpage, , want find circle , draw line circle.
is possible fabricjs?
try starting here:
http://fabricjs.com/quadratic-curve/
i made example you:
var canvas = new fabric.canvas('c'); canvas.add( new fabric.circle({ top: 50, left: 50, radius: 25, fill: 'red' }), new fabric.circle({ top: 300, left: 300, radius: 25, fill: 'red' }) ); canvas.renderall(); $('#drawline').click(function(){ canvas.add(new fabric.line([50, 50, 300, 300], { left: 50+25, //25 = 50/radius top: 50+25, stroke: 'blue' })); });
link here: http://jsfiddle.net/q6y6k/17/
Comments
Post a Comment