ui-map icon indicating copy to clipboard operation
ui-map copied to clipboard

fix: Removed map- prefix from event names

Open ProLoser opened this issue 12 years ago • 5 comments

I didn't see a reason to keep the prefix as the original DOM elements are not used for anything else

This is a Pull Request because it's a destructive change. If anyone disagrees please make your voice known.

ProLoser avatar May 16 '13 06:05 ProLoser

I use original DOM events, because I need to to do a hack outside of $apply. Will this change break them?

glebm avatar May 16 '13 14:05 glebm

I'm a little confused, can you paste a snippet?

What this does is before, things like clickclose events (from Google Maps API) would actually be routed to ui-event as map-clickclose to avoid accidentally triggering normal events on the relevant DOM element.

I'm essentially dropping the prefix because I don't think the relevant DOM elements are used for anything other than giving you a handle to the map objects, and it only serves to make usage more complicated/confusing.

ProLoser avatar May 16 '13 19:05 ProLoser

Will I still be able to bind directly like in the snippet below?

google.maps.event.addListener(scope.googleMap, 'bounds_changed', onBoundsChanged) # onBoundsChanged called outside $apply
# and trigger
google.maps.event.trigger(scope.googleMap, 'resize')

glebm avatar May 19 '13 14:05 glebm

Yes that will be completely unaffected. This only effects people who bind using ui-event On May 19, 2013 7:20 AM, "Gleb Mazovetskiy" [email protected] wrote:

Will I still be able to bind directly like in the snippet below?

google.maps.event.addListener(scope.googleMap, 'bounds_changed', onBoundsChanged)

and

google.maps.event.trigger(s.googleMap, 'resize')

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ui-map/pull/9#issuecomment-18118379 .

ProLoser avatar May 19 '13 20:05 ProLoser

OK, great! Thanks, sorry for not getting it :)

glebm avatar May 20 '13 06:05 glebm