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

Allow Float values in height input box #5198

Merged
merged 1 commit into from
Aug 3, 2018

Conversation

jguthrie100
Copy link
Contributor

Fixes #5184
Seems to be as simple as switching the parseInt to parseFloat when parsing input values.

Only issue is that it allows float values for all tags set using the input box (i.e. 'motorway lanes', which should presumeably just be an integer! Not sure how to avoid this though, without doing something like type=integer or type=float in the tag presets json files

@bhousel
Copy link
Member

bhousel commented Aug 3, 2018

Thanks @jguthrie100 !

Only issue is that it allows float values for all tags set using the input box (i.e. 'motorway lanes', which should presumeably just be an integer! Not sure how to avoid this though, without doing something like type=integer or type=float in the tag presets json files

Yeah, I thought about adding a dedicated integer field for fields that should be one, but I worry that many of the tags that we think of as integers also need to support text entry like no or yes, because this is an established OpenStreetMap convention.

@bhousel bhousel merged commit 490d4d3 into openstreetmap:master Aug 3, 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.

3 participants