-
Notifications
You must be signed in to change notification settings - Fork 817
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
feat: add animation field to markers #852
Conversation
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Added some comments
* Which animation to play when marker is added to a map. | ||
* This can be "bounce" or "drop" | ||
*/ | ||
animation: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be animation: "BOUNCE" | "DROP" | null;
@@ -31,6 +31,7 @@ export interface Marker extends MVCObject { | |||
setOpacity(opacity: number): void; | |||
setVisible(visible: boolean): void; | |||
setZIndex(zIndex: number): void; | |||
setAnimation(animation: any): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this way, users can also provide a real google.maps.Animation
@@ -61,6 +63,12 @@ export class MarkerManager { | |||
return this._markers.get(marker).then((m: Marker) => m.setZIndex(marker.zIndex)); | |||
} | |||
|
|||
updateAnimation(marker: SebmGoogleMapMarker): Promise<void> { | |||
return this._markers.get(marker).then((m: Marker) => | |||
m.setAnimation(google.maps.Animation[marker.animation]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can also be null/undefined:
if (typeof marker.animation === 'string) {
m.setAnimation(google.maps.Animation[marker.animation]);
} else {
m.setAnimation(marker.animation);
}
@@ -73,6 +81,10 @@ export class MarkerManager { | |||
title: marker.title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please handle the animation here, please handle also null/undefined cases here as above.
@@ -73,6 +81,10 @@ export class MarkerManager { | |||
title: marker.title | |||
}); | |||
this._markers.set(marker, markerPromise); | |||
|
|||
markerPromise.then((m: Marker) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above
Feature to set animation for map markers Updated according to comments in sebholstein#852 issue: Add animation field to markers sebholstein#580
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
Sorry for long update, please let me know if there's anything else should be fixed. Thank you. |
@xdimension can you please reword the commit messages and squash so this can get merged. Looking forward to it -- thanks |
f4f197c
to
640e535
Compare
Feature to set animation for map markers issue: Add animation field to markers sebholstein#580 feat: add animation field to markers Feature to set animation for map markers Updated according to comments in sebholstein#852 issue: Add animation field to markers sebholstein#580
There were the following issues with your Pull Request
Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md This message was auto-generated by https://gitcop.com |
45a550d
to
b338c31
Compare
@xdimension thanks for fixing the PR - can you rebase? @SebastianM can you please get this merged in once he fixes the PR? Thanks guys |
@rhutchison My latest update is as below, I have done the squash. Not sure what I can do next, just let me know if I can help further. Thanks. |
@xdimension it needs to be rebased on top of the latest changes - merge conflicts. |
b338c31
to
f7f483c
Compare
Can you fix the unit tests? Then I can merge it. |
Feature to set animation for map markers issue: Add animation field to markers sebholstein#580
f7f483c
to
d99e292
Compare
@SebastianM Updated. I'm not really familiar with testing yet, so please review. Thanks. |
ETA of when will this be available? |
@xdimension thanks for your work getting this updated. |
What's the status of this? |
Any update on this PR ? |
@SebastianM @xdimension Will this feature be merged soon? |
any updates on this? |
Hi, is this feature supported now? |
I'm assuming this will be in the next release? Any info on the schedule? |
Please please, or just let us access the native google map to add the marker following the google documentation :3 |
Feature to set animation for map markers
issue: Add animation field to markers #580