我想知道我们是否可以添加另一个动态事件,如click,touchstart等。
例如:
$('canvas').drawArc({
layer:true,
strokeStyle: '#000',
strokeWidth: 5,
x: 100, y: 100,
radius: 50,
my_event : function(layer)
{
}
});发布于 2014-10-10 08:56:54
根据the documentation的说法,click和touchstart事件已经在jCanvas中得到了本机支持。您需要做的就是分别指定click和touchstart作为回调的键名:
$('canvas').drawArc({
layer:true,
strokeStyle: '#000',
strokeWidth: 5,
x: 100, y: 100,
radius: 50,
click : function(layer)
{
},
touchstart : function(layer)
{
}
});https://stackoverflow.com/questions/24388488
复制相似问题