hongkhanh / cropbox

A lightweight and simple JavaScript, Jquery, YUI plugin to crop your avatar
http://hongkhanh.github.io/cropbox/
MIT License
266 stars 99 forks source link

on Mouse Up, sometimes the Image still move while Mouse move #19

Open nephon opened 9 years ago

nephon commented 9 years ago

Instead of having "mousemove" Event listen for all the time el.on('mousedown', imgMouseDown); //el.on('mousemove', imgMouseMove); $(window).on('mouseup', imgMouseUp);

/***/ Adjustment as below imgMouseDown = function(e) { el.on('mousemove', imgMouseMove); }

imgMouseUp = function(e) { el.off('mousemove'); }

/***/ I have also change from "bind" to "on"

sidaurukfreddy commented 8 years ago

Yes me too here, i have mulitple crop in one page the first one working but the second one images still move while mouse move, where is the author

sidaurukfreddy commented 8 years ago

did you solved this issue ? Thanks

2van commented 7 years ago

@sidaurukfreddy @nephon I also have this issue, and it has been resolved. see imgMouseUp sometimes doesn't work. the reason may be related with this question event.stopPropagation() and event.preventDefault().