rvera / image-picker

Image Picker is a simple jQuery plugin that transforms a select element into a more user friendly graphical interface.
http://rvera.github.com/image-picker
Other
906 stars 216 forks source link

change order of events; make event available #39

Closed geza-kiss closed 7 years ago

geza-kiss commented 10 years ago

Thanks for making this great tool available! The following would be useful (I'd also need them now):

  1. The order the events are received is: changed, clicked, selected. This means that before the first event, the state of the selection changes, i.e. you cannot know what was the previous state (unless you store the states of all your image-picker objects). If "clicked" came before "changed", then you could use the previous state of the selection, which is sometimes useful (e.g. to restore it if the event is cancelled).
  2. You may need to know if e.g. CTRL is pressed during the click, to be able to modify the meaning. The event (and thus event.ctrlKey, etc.) is available as window.event on Chrome and Internet Explorer, but not on e.g. Firefox. If the event object was passed to the event function, that would make it usable that way universally under all browsers.
  3. Making available the context menu (or right click) event could be useful as well.

Thanks!

geza-kiss commented 9 years ago

I just realized that you make the old values available when there is a change, so please disregard that. But the others are still relevant. Thanks!

rvera commented 7 years ago

Thanks, fixed the first to points on version 0.3.0. Not sure I get the third point.