0
如果选择已存在,我想取消我的“新”选择。我在onSelectStart上返回false的尝试不像我期望的那样工作。imgareaselect:如果已经存在选择,则取消新选择
我怎么能做到这一点?
代码下面的例子:
currentCoords = {
x1: $('input[name="thumb-x1"]')
};
selectthumb = $('.img-orig-thumb').imgAreaSelect({
instance: true,
handles: true,
aspectRatio: '1:1',
imageWidth: <?php echo $imgsize[0]; ?>,
imageHeight: <?php echo $imgsize[1]; ?>,
onSelectStart: function(img, selection) {
_selection = parseInt(currentCoords.x1.val());
if(_selection > 0) return false;
}
});