imgAreaSelect is storing all previous selection of coordinates

77 Views Asked by At

Unable to clean old data 'selection' while using imgAreaSelect in jQuery

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


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

On running above code multiple times on same image with different region of interest selection. The selection co-ordinates doesn't clear old values and on publishing its showing alert windows with each set.

Please suggest the ways to clear old values

0

There are 0 best solutions below