imgAreaSelect存储所有先前选择的坐标

时间:2019-04-22 13:44:55

标签: javascript jquery imageareaselect

在jQuery中使用imgAreaSelect时无法清除旧数据“选择”

$('img#photo').imgAreaSelect({
    handles: true,
    onSelectEnd: someFunction
});


alert('x=' + selection.x1 + ' y=' + selection.y1 + ' x2=' + selection.x2 + ' y2=' + selection.y2)

在同一幅图像上多次运行以上代码时,选择了不同的关注区域。选择坐标不会清除旧值,也不会清除每组的显示警报窗口。

请提出清除旧值的方法

0 个答案:

没有答案