简体   繁体   中英

getting drag event on canvas when all elements marked draggable=false

I'm using mousedown, mousemove mouseup and mouseout events on a canvas to create a custom drag control.

Now this is working fine,except that occasionally a drag event will be fired, which prevents the mouseup firing which borks it all up.

I have set draggable=false on ALL my elements, yet this still occurs.

I'm using Chrome Version 27.0.1453.116 m and the app is in Angularjs Also using twitter bootstrap

cheers

Edit: put up some code https://gist.github.com/neilmanuell/5917036

I solved this issue by re architecture my application. The issues I was getting with unwanted mouse events being fired seemed to be issues with browser implementation. my original approach was flawed as it was coming from an as3 way of doing things. once i'd approached the problem in a more html way the mouse events were no longer an issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM