I would like to know if we can add another dynamic event such as click, touchstart etc..
Ex :
$('canvas').drawArc({
layer:true,
strokeStyle: '#000',
strokeWidth: 5,
x: 100, y: 100,
radius: 50,
my_event : function(layer)
{
}
});
According to the documentation, the click
and touchstart
events are already supported natively in jCanvas. All you need to do is specify click
and touchstart
(respectively) as the key names for your callbacks:
$('canvas').drawArc({
layer:true,
strokeStyle: '#000',
strokeWidth: 5,
x: 100, y: 100,
radius: 50,
click : function(layer)
{
},
touchstart : function(layer)
{
}
});