-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgl-map firing click twice #107
Comments
hey... experienced the same behavior just right now. Does this seem to fire the angular internal (click) event and the ngx-map (click) event both? Maybe just a naming thing? Thank u all for this module. |
Yep that's probably a name conflict 😅 |
@Wykks I've tried enabling rule "no-output-native" like you suggested here: #149 That shows that there are quite a lot of conflicts like this one. 21 to be exact:
I do not think that renaming all of these is a good idea. First of all, i'm not sure what is a good naming convention to use. Angular Style Guide directly warn against using "on" prefix: https://angular.io/guide/styleguide#style-05-16 At the same time, many 3rd party libs use just that convention :) Secondly, if we rename all those 21 events... well it's a huge breaking change. Do you have any thought on this subject? |
I didn't expect that 😅 . It remind me that material did something similar a while ago (eg https://github.com/angular/components/pull/8053/files). Maybe for the same issues? When there's a conflict with native output, we can just add context, like that: For the v4, we can just rename
(note: sorry for the delay here, I disconnected a bit these days...) |
@Wykks I'm not sure if i like this "mapClick" convention. It's a bit too wordy + a lot of repetition. Like: <mglPopup (popupOpen)="..." (popupClose)="..." [popupThis]="..." popupThat="..."->. Too many "popup"s as for my taste :) I agree on your point about "onClick"/"clicked". But i do not see any better alternatives. Also, it seems that both are widely used by libs out there. If you asked me, i'd go with "clicked" as it's familiar to everyone who uses Angular Material. I'd also change all conflicting names, while keeping the old for some time and deprecating them. In any case, the final decision is yours. Please make it when you have time. |
I'm being impacted by this too. Right now, my workaround is to simply just look for the lngLat.
|
@jamesrusso Yes, i plan to fix this at some point. But that will be in the next major release (5.X) since it's a breaking change. Unfortunatelly, at the moment i cannot tell when i will have time to work on this. |
* feat: update to mapbox-gl 1.12.0 (Wykks#253) * fix: Change many outputs to avoid confusion (fix Wykks#107) Inspired by @angular/component google-map component * docs: move docs to repository * test: fix map test * showcase: refactor whole app & add doc versionning BREAKING CHANGE: Remove undocumented resize API * chore: update and run prettier * docs: fix mgl-image example * feat(mglDraggable): remove marker support BREAKING CHANGE: Remove marker support for mglDraggable (use draggable input instead) * showcase: fix incorrect import (& small layout issue) * fix(draggable): fix incorrect use of takeUntil takeUntil should not be used before a switchMap. Using simple subscription pattern instead for consistency Also fix geolocate output type * feat: update to mapbox-gl 1.13.0 * test: fix layer test * chore(release): 5.0.0 * build(deps): bump @mapbox/mapbox-gl-geocoder to ^4.0.0 and add type definitions Co-authored-by: makspetrov <mp@keatech.com> * build(deps): use Angular 11 & mapbox-gl 2.0 Co-authored-by: makspetrov <mp@keatech.com> * chore(release): 6.0.0 * fix(deps): add @types/mapbox__mapbox-gl-geocoder (Wykks#274) * chore(release): 6.0.1 * fix: declare Position interface for geolocate-control (Wykks#276) * chore(release): 6.0.2 * fix: Position interface (Wykks#278) * chore(release): 6.0.3 * build: update @types/mapbox-gl 2.0.3 -> 2.1.0 (Wykks#281) * chore(release): 6.0.4 * doc: correct README.md on the subject of token being mandatory (Wykks#287) * build(deps): bump elliptic from 6.5.3 to 6.5.4 (Wykks#288) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](indutny/elliptic@v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): update dependencies Co-authored-by: Anthony MacKinnon <anthony@georadix.com> Co-authored-by: Wykks <contact@wykks.eu> Co-authored-by: Maks <Nosfit@ukr.net> Co-authored-by: makspetrov <mp@keatech.com> Co-authored-by: Dmytro Gokun <dmytro.gokun@gmail.com> Co-authored-by: Aymen Dhahri <41507665+DroidZed@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
html:
listener:
console:
The text was updated successfully, but these errors were encountered: