Martin Raifer
dd30a39d74
fix logic bug, extend test coverage
2022-10-27 17:07:32 +02:00
Martin Raifer
52ae374cee
add tests
2022-10-13 13:47:16 +02:00
Bryan Housel
3608659d21
Restore field inheritance
2020-02-10 16:22:13 -05:00
Bryan Housel
e3e7cd3003
Memoize presetCollection.item (it's an Array.find)
...
Also add tests for `matchAllGeometry`
2020-02-05 10:32:20 -05:00
Bryan Housel
0fe766d9a4
WIP on external presets
...
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
2020-02-05 09:38:26 -05:00
Quincy Morgan
7700fac66a
Update test label wording
2020-01-15 14:31:19 -05:00
Quincy Morgan
41355bf2a0
Rename "visible" property of presets to "addable" (re: a06ec59514b30a52601e3614ef69006d2dc1bc91)
2020-01-15 14:29:45 -05:00
Bryan Housel
2fd6359505
Boost matchScore if additional matches occur in addTags
...
(closes #6802 )
2019-08-26 12:53:03 -04:00
Tobias Zwick
a1b89332bb
add test
2019-04-30 22:15:34 +02:00
Quincy Morgan
12b1af7002
Don't say tags imply area for tags that iD doesn't have a preset for ( close #5933 )
2019-02-25 12:42:39 -05:00
Bryan Housel
7138acc652
Properly export areaKeys, fix preset and maprules tests
2019-01-30 15:29:37 -05:00
Max Grossman
96e44be69c
merge 2.12.2
2018-12-13 11:22:32 -05:00
Max Grossman
f3e6459191
working on preset visibility
2018-12-13 11:16:24 -05:00
Bryan Housel
ea9e3008a5
addTags() -> setTags() / removeTags() -> unsetTags()
...
This avoids overriding the `addTags` and `removeTags` objects with functions
2018-11-21 12:59:43 -05:00
Bryan Housel
8abc39461b
Fallback Area preset should preserve the area=yes tag
...
(closes #4424 )
2017-10-10 20:54:41 -04:00
Bryan Housel
87950fd472
Fix lib export, flatten names in tests and docs
2016-10-04 21:56:09 -04:00
Kushan Joshi
295b8544eb
Remove linting errors from spec/modes & spec/presets
2016-06-15 18:26:11 +05:30
Bryan Housel
649ba856f6
Preset.isFallback() should return true for the area: yes preset
2016-01-29 00:38:33 -05:00
Bryan Housel
99d037e97f
Better logic for adding area=yes ( closes #2578 )
...
This fixes a few issues:
1. before: checked first key in applyTags and break loop, now: check all of them
(this was what caused `area=yes` to be added to 'branded' presets:
the first key is for these is `name` which isn't in areaKeys.)
2. add `area=yes` if user is drawing an area but the preset can be an
area or a line (e.g. `barrier=city_wall`)
3. remove `area=yes` when switching to another preset
2015-04-22 17:04:18 -04:00
John Firebaugh
d381812f96
Add area=yes when necessary
...
Example: highway=pedestrian areas.
Fixes #2069
2014-01-03 12:46:50 -08:00
John Firebaugh
d1b4e04ee4
Don't add addr:housenumber=yes when applying Address preset ( #1874 )
2013-10-09 16:35:12 -07:00
John Firebaugh
6cdd928ea3
Default wildcard tags to "yes"
...
Fixes #1715
2013-08-22 14:30:27 -07:00
John Firebaugh
4bdd49b5fc
Adjustments to multipolygon preset
...
* It shouldn't appear as a search result for simple areas.
* Changing to another area preset shouldn't remove the
type=multipolygon tag.
* It shouldn't be preferred to the Building preset, which
matches with score 0.5.
Fixes #1546 .
2013-05-29 16:00:34 -07:00
John Firebaugh
5868875833
Split "other" preset into geometry specific fallbacks
...
This way the name and icon can be geometry-specific.
2013-05-24 11:14:59 -07:00
John Firebaugh
525d37c647
Preset#matchTags -> Preset#matchScore
2013-05-13 17:48:18 -07:00
John Firebaugh
fdd49233b1
Avoid recomputing geometry in an inner loop
2013-04-25 11:27:53 -07:00
Tom MacWright
b59f28424c
Translatable documentation, Fixes #1108
...
* Adds Marked
* Fixes a global leak in toGeoJSON
* Removes marked from package.json
* Adds documentation to core.yaml
* Removes stray console.log from tests
2013-03-27 14:34:34 -04:00
Ansis Brammanis
8c319d0d15
make other presets localizable, and update tests
2013-03-26 16:40:42 -04:00
John Firebaugh
d0336a0995
Extract preset names to translations ( fixes #1044 )
2013-03-14 17:27:34 -07:00
Ansis Brammanis
547f12f822
Fields now have an optional geometry type
...
field defaults aren't geometry specific
the geometry type determines whether
that field (and default value) apply
to an entity
2013-03-14 16:48:09 -04:00
John Firebaugh
41e696a2c5
Flatten presets match properties
2013-03-13 12:45:20 -07:00
John Firebaugh
c1aa8e0270
form/forms -> field/fields
2013-03-13 11:34:21 -07:00
John Firebaugh
107f6cfeba
type -> geometry
2013-03-12 13:00:32 -07:00
Ansis Brammanis
f72e294156
score wildcard matches as half a match
...
so that building=* doesn't get prioritized over more
specific one tag presets, like amenity=hospital
2013-03-08 11:36:57 -05:00
Ansis Brammanis
3a680b027f
add tests for iD.presets.Preset
2013-03-05 13:06:21 -05:00