Skip to content
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

google-map-poly watches child elements #347

Closed
wants to merge 1 commit into from

Conversation

nerdkid93
Copy link

google-map-poly watches the lat/lng properties of it's child elements for updated properties

`google-map-poly` watches the lat/lng properties of it's child elements
@nerdkid93
Copy link
Author

I've made these changes in my own bower install of google-maps, but it'd be nice to have them in the original repo to avoid overwriting our changes.

@nerdkid93
Copy link
Author

Because I already fixed this in my own install, I didn't bother to create an issue for it. However, I should provide some explanation for this PR...

google-map-poly's MutationObserver only watches for new child elements to be added or removed from its content selector. I fixed this by making the observer watch not just additions and subtractions to its childList, but also attribute changes (specifically latitude and longitude). This means that the following code ($ needs to be included to map as attributes) will allow dynamic bindings where points can be moved around:

<google-map-poly>
  <google-map-point latitude$="{{p1.lat}}" longitude$="{{p1.lng}}"></google-map-point>
  <google-map-point latitude$="{{p2.lat}}" longitude$="{{p2.lng}}"></google-map-point>
</google-map-poly>

@nerdkid93
Copy link
Author

Where is the GoogleWebComponent team?

@nerdkid93
Copy link
Author

@e111077 Is anyone watching this project anymore?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot googlebot added cla: no and removed cla: yes labels Jun 5, 2018
@e111077
Copy link
Member

e111077 commented Jun 6, 2018

Heya GWC elements are maintained by individual googlers (not on the polymer team) that have decided to make and open source elements. It may be that they may have moved from their teams, left google, or simply forgot about these elements. The polymer team occasionally takes a look at these elements when it comes to huge breaking bugs.

I can take a look at this PR, but due to other work pulling me in the other direction right now, I won't be able to get to it this week.

In the meantime, you may be able to just fork the element, make changes and then bower install it from your release.

Copy link
Member

@e111077 e111077 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great PR!

@e111077
Copy link
Member

e111077 commented Jun 18, 2018

I just need you to resolve that CLA issue though

@e111077 e111077 closed this Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants