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

Auto-convert string to Number for marker input #1424

Merged
merged 4 commits into from
Jul 4, 2018

Conversation

dariobraun
Copy link
Contributor

I stumbled upon this PR, which seems to be put on hold by the original author.
I thought I'd give it a try so I incorporated your change request. Let me know if this is different from what you had in mind.

Fixes #771

@codecov
Copy link

codecov bot commented Jun 8, 2018

Codecov Report

Merging #1424 into master will decrease coverage by 0.08%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
- Coverage   28.45%   28.37%   -0.09%     
==========================================
  Files          30       30              
  Lines        1353     1357       +4     
  Branches      182      184       +2     
==========================================
  Hits          385      385              
- Misses        966      970       +4     
  Partials        2        2
Impacted Files Coverage Δ
packages/core/directives/marker.ts 35.36% <0%> (-1.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e4878b...b6fb38c. Read the comment docs.

@@ -158,8 +158,11 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit {

/** @internal */
ngOnChanges(changes: {[key: string]: SimpleChange}) {
if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {
return;
if (typeof this.latitude === 'string') {
Copy link
Owner

Choose a reason for hiding this comment

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

this breaks the case that the marker only gets added to the manager if latitude/longitude are numbers. Can you add these check underneath?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad! I added the check again

@dariobraun
Copy link
Contributor Author

Is this still relevant? If so I'd appreciate a new review

@sebholstein sebholstein merged commit c1d6c6d into sebholstein:master Jul 4, 2018
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.

None yet

2 participants