mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-26 07:23:40 +00:00
when matching presets, count 'area' match as half
This commit is contained in:
@@ -18,7 +18,13 @@ iD.presets.Preset = function(id, preset, fields) {
|
||||
score = 0;
|
||||
for (var t in tags) {
|
||||
if (entity.tags[t] === tags[t]) {
|
||||
score++;
|
||||
if (t === 'area') {
|
||||
// score area tag lower to prevent other/area preset
|
||||
// from being chosen over something more specific
|
||||
score += 0.5;
|
||||
} else {
|
||||
score += 1;
|
||||
}
|
||||
} else if (tags[t] === '*' && t in entity.tags) {
|
||||
score += 0.5;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user