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

Add more types of shapes with diff-updates #29

Merged
merged 10 commits into from
Nov 25, 2015
Merged

Add more types of shapes with diff-updates #29

merged 10 commits into from
Nov 25, 2015

Conversation

erkie
Copy link
Collaborator

@erkie erkie commented Nov 9, 2015

@SamvelRaja this is in reference to the issue where we discussed marker diffing #27.

This includes some major changes in the API of the component.

  • I moved out the markerOptions object and infoWindow object into separate properties
  • Renamed markerOptions to just markers
  • Refactored the Helper-mega object into smaller classes, and to be used as an instance instead
  • Add rectangles, circles shapes as well
  • Update README.md to reflect changes
  • Make key attributes mandatory on all passed in objects, so we can diff and add new ones, update old ones and remove removed ones

Example usage is now for example:

{{google-maps-addon mapOptions=mapOptions markers=markers}}

With this comes a lot of flexibility and the ability to easily add more objects, like Polygons and PolyLines. We can also add a lot more lifetime callbacks to the objects, like onCreate, onUpdate and onRemove which provides loads of flexibility. We can also animate changes because we always only update changed attributes.

What do you think? I have tried it out in our projects and it works very well and is nice to work with.

@erkie
Copy link
Collaborator Author

erkie commented Nov 23, 2015

@SamvelRaja would love to hear your thoughts on this. :)

@SamvelRaja
Copy link
Owner

@erkie kindly merge it on your own and let me know. please make sure the tests are passing :p

@erkie
Copy link
Collaborator Author

erkie commented Nov 25, 2015

Thanks @SamvelRaja. Tests pass now! Merging

erkie added a commit that referenced this pull request Nov 25, 2015
Add more types of shapes with diff-updates
@erkie erkie merged commit 4c84821 into master Nov 25, 2015
@erkie erkie deleted the marker-diffing branch November 25, 2015 21:15
@SamvelRaja
Copy link
Owner

@erkie will update npm by this week end.
It would be better if you can specify your email to add as contributer in npm as well

@erkie
Copy link
Collaborator Author

erkie commented Nov 26, 2015

Cool! My npm email is [email protected]

@SamvelRaja
Copy link
Owner

@erkie i tried adding as you as collabarator in npm to allow you to publish by yourself, but i couldn't get your username for it.

@erkie
Copy link
Collaborator Author

erkie commented Dec 23, 2015

My npm username is erikrothoff if it helps. Thanks!

@SamvelRaja
Copy link
Owner

Added you as collaborator, should be reflected within 24hrs from now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants