Reputation: 41
I have a html 5 canvas where i have a polygon . I want to bind this polygon with jquery. but i am not getting how to do it.
Polygon:
var poly = new Kinetic.Polygon({
points: [37,224,250,296,388,239,391,336,250,416,151,374,150,368,127,360,127,364,37,325],
fill: 'none',
stroke: '#000',
strokeWidth: 0,
name: 'poly',
draggable: false,
id:'skirt'
});
Jquery:
$('what to put here?').droppable({
function body..................
});
Hope any one can help or correct me here... Thanks in advance
Upvotes: 0
Views: 154
Reputation: 318518
Things drawn on a canvas are not part of the DOM tree (only the canvas itself is) so you cannot bind any events to them.
Upvotes: 2