Merge branch 'master' into validation

This commit is contained in:
Quincy Morgan
2019-01-28 12:14:04 -05:00
34 changed files with 208 additions and 131 deletions
-1
View File
@@ -1949,7 +1949,6 @@ div.combobox {
margin-left: -30px;
vertical-align: top;
cursor: pointer;
pointer-events: none;
}
[dir='rtl'] .combobox-caret {
margin-left: 0;
+7 -2
View File
@@ -2423,7 +2423,7 @@ en:
amenity/drinking_water:
# amenity=drinking_water
name: Drinking Water
# 'terms: fountain,potable'
# 'terms: potable water source,water fountain,drinking fountain,bubbler,water tap'
terms: '<translate with synonyms or related terms for ''Drinking Water'', separated by commas>'
amenity/driving_school:
# amenity=driving_school
@@ -5098,6 +5098,11 @@ en:
# natural=water
name: Water
terms: '<translate with synonyms or related terms for ''Water'', separated by commas>'
natural/water/basin:
# 'natural=water, water=basin'
name: Basin
# 'terms: detention,drain,overflow,rain,retention'
terms: '<translate with synonyms or related terms for ''Basin'', separated by commas>'
natural/water/canal:
# 'natural=water, water=canal'
name: Canal
@@ -5119,7 +5124,7 @@ en:
natural/water/river:
# 'natural=water, water=river'
name: River
# 'terms: beck,branch,brook,course,creek,estuary,rill,rivulet,run,runnel,stream,tributary,watercourse'
# 'terms: beck,branch,brook,course,creek,estuary,rill,riverbank,rivulet,run,runnel,stream,tributary,watercourse'
terms: '<translate with synonyms or related terms for ''River'', separated by commas>'
natural/water/stream:
# 'natural=water, water=stream'
+22 -21
View File
@@ -49,14 +49,14 @@
"amenity/animal_breeding": {"icon": "maki-veterinary", "fields": ["name", "operator", "address", "building_area", "opening_hours", "animal_breeding"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["breeding", "bull", "cat", "cow", "dog", "horse", "husbandry", "kitten", "livestock", "pet breeding", "puppy", "reptile"], "tags": {"amenity": "animal_breeding"}, "name": "Animal Breeding Facility"},
"amenity/animal_shelter": {"icon": "maki-veterinary", "fields": ["name", "operator", "address", "building_area", "opening_hours", "animal_shelter"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["adoption", "aspca", "cat", "dog", "horse", "kitten", "pet care", "pet rescue", "puppy", "raptor", "reptile", "rescue", "spca"], "tags": {"amenity": "animal_shelter"}, "name": "Animal Shelter"},
"amenity/arts_centre": {"icon": "maki-theatre", "fields": ["name", "address", "building_area", "opening_hours", "website"], "moreFields": ["fee", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "arts_centre"}, "name": "Arts Center"},
"amenity/atm": {"icon": "maki-bank", "fields": ["operator", "network", "cash_in", "currency_multi", "drive_through"], "moreFields": ["name", "brand", "lit", "opening_hours", "wheelchair"], "geometry": ["point", "vertex"], "terms": ["money", "cash", "machine"], "tags": {"amenity": "atm"}, "name": "ATM"},
"amenity/atm": {"icon": "maki-bank", "fields": ["operator", "network", "cash_in", "currency_multi", "drive_through"], "moreFields": ["name", "brand", "lit", "opening_hours", "wheelchair", "covered"], "geometry": ["point", "vertex"], "terms": ["money", "cash", "machine"], "tags": {"amenity": "atm"}, "name": "ATM"},
"amenity/bank": {"icon": "maki-bank", "fields": ["name", "operator", "address", "building_area", "atm", "drive_through"], "moreFields": ["opening_hours", "currency_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["credit union", "check", "deposit", "fund", "investment", "repository", "reserve", "safe", "savings", "stock", "treasury", "trust", "vault"], "tags": {"amenity": "bank"}, "name": "Bank"},
"amenity/bar": {"icon": "maki-bar", "fields": ["name", "address", "building_area", "outdoor_seating", "brewery"], "moreFields": ["smoking", "opening_hours", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["dive", "beer", "bier", "booze"], "tags": {"amenity": "bar"}, "name": "Bar"},
"amenity/bbq": {"icon": "maki-bbq", "fields": ["covered", "fuel", "access_simple"], "moreFields": ["lit"], "geometry": ["point"], "terms": ["bbq", "grill"], "tags": {"amenity": "bbq"}, "name": "Barbecue/Grill"},
"amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "moreFields": ["lit", "access_simple"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"},
"amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple", "fee"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"},
"amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "fee", "payment_multi"], "moreFields": ["opening_hours", "address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"},
"amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "moreFields": ["payment_multi"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"},
"amenity/bench": {"icon": "temaki-bench", "fields": ["backrest", "material", "seats", "colour"], "moreFields": ["access_simple", "inscription", "lit"], "geometry": ["point", "vertex", "line"], "terms": ["seat"], "tags": {"amenity": "bench"}, "name": "Bench"},
"amenity/bicycle_parking": {"icon": "maki-bicycle", "fields": ["bicycle_parking", "capacity", "operator", "covered", "access_simple", "fee"], "moreFields": ["payment_multi", "covered"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_parking"}, "name": "Bicycle Parking"},
"amenity/bicycle_rental": {"icon": "maki-bicycle", "fields": ["capacity", "network", "operator", "fee", "payment_multi"], "moreFields": ["opening_hours", "address", "website", "phone", "email", "fax", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "terms": ["bike"], "tags": {"amenity": "bicycle_rental"}, "name": "Bicycle Rental"},
"amenity/bicycle_repair_station": {"icon": "maki-bicycle", "fields": ["operator", "brand", "opening_hours", "fee", "service/bicycle"], "moreFields": ["payment_multi", "covered"], "geometry": ["point", "vertex"], "terms": ["bike", "repair", "chain", "pump"], "tags": {"amenity": "bicycle_repair_station"}, "name": "Bicycle Repair Tool Stand"},
"amenity/biergarten": {"icon": "maki-beer", "fields": ["name", "address", "building", "outdoor_seating", "brewery"], "moreFields": ["{amenity/bar}"], "geometry": ["point", "area"], "tags": {"amenity": "biergarten"}, "terms": ["beer", "bier", "booze"], "name": "Biergarten"},
"amenity/boat_rental": {"icon": "temaki-boating", "fields": ["name", "operator", "fee", "payment_multi"], "moreFields": ["address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "boat_rental"}, "name": "Boat Rental"},
"amenity/bureau_de_change": {"icon": "maki-bank", "fields": ["name", "operator", "payment_multi", "currency_multi", "address", "building_area"], "moreFields": ["opening_hours", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["bureau de change", "money changer"], "tags": {"amenity": "bureau_de_change"}, "name": "Currency Exchange"},
@@ -82,7 +82,7 @@
"amenity/dive_centre": {"icon": "maki-swimming", "fields": ["name", "operator", "address", "building_area", "opening_hours", "scuba_diving"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["diving", "scuba"], "tags": {"amenity": "dive_centre"}, "name": "Dive Center"},
"amenity/doctors": {"icon": "maki-doctor", "fields": ["name", "operator", "healthcare/speciality", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["medic*", "physician"], "tags": {"amenity": "doctors"}, "addTags": {"amenity": "doctors", "healthcare": "doctor"}, "removeTags": {"amenity": "doctors", "healthcare": "doctor"}, "reference": {"key": "amenity", "value": "doctors"}, "name": "Doctor"},
"amenity/dojo": {"icon": "maki-pitch", "fields": ["name", "sport", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["martial arts", "dojang"], "tags": {"amenity": "dojo"}, "name": "Dojo / Martial Arts Academy"},
"amenity/drinking_water": {"icon": "maki-drinking-water", "fields": ["operator", "access_simple", "fee", "wheelchair"], "moreFields": ["lit"], "geometry": ["point"], "tags": {"amenity": "drinking_water"}, "terms": ["fountain", "potable"], "name": "Drinking Water"},
"amenity/drinking_water": {"icon": "maki-drinking-water", "fields": ["operator", "access_simple", "fee", "wheelchair"], "moreFields": ["lit", "covered"], "geometry": ["point"], "tags": {"amenity": "drinking_water"}, "terms": ["potable water source", "water fountain", "drinking fountain", "bubbler", "water tap"], "name": "Drinking Water"},
"amenity/driving_school": {"icon": "maki-car", "fields": ["name", "operator", "address", "building_area", "opening_hours"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "driving_school"}, "name": "Driving School"},
"amenity/embassy": {"icon": "maki-embassy", "fields": ["name", "country", "address", "building_area"], "moreFields": ["website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "embassy"}, "name": "Embassy"},
"amenity/fast_food": {"icon": "maki-fast-food", "fields": ["name", "cuisine", "operator", "address", "building_area", "drive_through"], "moreFields": ["opening_hours", "diet_multi", "takeaway", "delivery", "smoking", "capacity", "outdoor_seating", "internet_access", "internet_access/fee", "internet_access/ssid", "payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "fast_food"}, "terms": ["restaurant", "takeaway"], "name": "Fast Food"},
@@ -114,7 +114,7 @@
"amenity/nightclub": {"icon": "maki-bar", "fields": ["name", "operator", "address", "building_area", "opening_hours", "smoking"], "moreFields": ["payment_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "tags": {"amenity": "nightclub"}, "terms": ["disco*", "night club", "dancing", "dance club"], "name": "Nightclub"},
"amenity/parking_entrance": {"icon": "maki-entrance-alt1", "fields": ["access_simple", "ref"], "geometry": ["vertex"], "tags": {"amenity": "parking_entrance"}, "name": "Parking Garage Entrance/Exit"},
"amenity/parking_space": {"fields": ["capacity"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "parking_space"}, "matchScore": 0.95, "name": "Parking Space"},
"amenity/parking": {"icon": "maki-car", "fields": ["operator", "parking", "capacity", "access_simple", "fee", "surface"], "moreFields": ["name", "supervised", "park_ride", "maxstay", "payment_multi", "address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "parking"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "truck parking", "vehicle parking"], "name": "Parking Lot"},
"amenity/parking": {"icon": "maki-car", "fields": ["operator", "parking", "capacity", "access_simple", "fee", "surface"], "moreFields": ["name", "supervised", "park_ride", "maxstay", "payment_multi", "address", "website", "phone", "email", "fax", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "tags": {"amenity": "parking"}, "terms": ["automobile parking", "car lot", "car parking", "rv parking", "truck parking", "vehicle parking"], "name": "Parking Lot"},
"amenity/parking/multi-storey": {"icon": "maki-car", "fields": ["{amenity/parking}", "building", "levels", "height"], "geometry": ["area"], "tags": {"amenity": "parking", "parking": "multi-storey"}, "addTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "removeTags": {"building": "parking", "amenity": "parking", "parking": "multi-storey"}, "reference": {"key": "parking", "value": "multi-storey"}, "terms": ["car", "indoor parking", "multistorey car park", "parkade", "parking building", "parking deck", "parking garage", "parking ramp", "parking structure"], "name": "Multilevel Parking Garage"},
"amenity/payment_centre": {"icon": "maki-bank", "fields": ["name", "brand", "address", "building_area", "opening_hours", "payment_multi"], "moreFields": ["currency_multi", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["point", "area"], "terms": ["check", "tax pay", "bill pay", "currency", "finance", "cash", "money"], "tags": {"amenity": "payment_centre"}, "name": "Payment Center"},
"amenity/payment_terminal": {"icon": "maki-bank", "fields": ["name", "brand", "address", "opening_hours", "payment_multi"], "moreFields": ["currency_multi", "wheelchair"], "geometry": ["point"], "terms": ["interactive kiosk", "ekiosk", "atm", "bill pay", "tax pay", "phone pay", "finance", "cash", "money transfer", "card"], "tags": {"amenity": "payment_terminal"}, "name": "Payment Terminal"},
@@ -166,7 +166,7 @@
"amenity/shelter/picnic_shelter": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "lit", "bin"], "geometry": ["point", "area"], "tags": {"amenity": "shelter", "shelter_type": "picnic_shelter"}, "reference": {"key": "shelter_type", "value": "picnic_shelter"}, "terms": ["pavilion"], "name": "Picnic Shelter"},
"amenity/shelter/public_transport": {"icon": "maki-shelter", "fields": ["name", "shelter_type", "building_area", "bench", "lit"], "geometry": ["point", "area"], "terms": ["bus stop", "metro stop", "waiting"], "tags": {"amenity": "shelter", "shelter_type": "public_transport"}, "reference": {"key": "shelter_type", "value": "public_transport"}, "name": "Transit Shelter"},
"amenity/shower": {"icon": "temaki-shower", "fields": ["opening_hours", "fee", "supervised", "building_area", "access_simple", "wheelchair"], "moreFields": ["operator", "gender", "payment_multi"], "geometry": ["point", "vertex", "area"], "terms": ["rain closet"], "tags": {"amenity": "shower"}, "name": "Shower"},
"amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "moreFields": ["lit", "wheelchair"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"},
"amenity/smoking_area": {"icon": "fas-smoking", "fields": ["name", "shelter", "bin", "bench", "opening_hours"], "moreFields": ["lit", "wheelchair", "covered"], "geometry": ["point", "vertex", "area"], "terms": [], "tags": {"amenity": "smoking_area"}, "name": "Smoking Area"},
"amenity/social_facility": {"icon": "temaki-social_facility", "fields": ["name", "operator", "address", "building_area", "social_facility", "social_facility_for"], "moreFields": ["opening_hours", "wheelchair", "internet_access", "internet_access/fee", "internet_access/ssid", "website", "phone", "email", "fax"], "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility"}, "name": "Social Facility"},
"amenity/social_facility/food_bank": {"icon": "temaki-social_facility", "geometry": ["point", "area"], "terms": [], "tags": {"amenity": "social_facility", "social_facility": "food_bank"}, "reference": {"key": "social_facility", "value": "food_bank"}, "name": "Food Bank"},
"amenity/social_facility/group_home": {"icon": "maki-wheelchair", "fields": ["{amenity/social_facility}", "wheelchair"], "geometry": ["point", "area"], "terms": ["old", "senior", "living", "care home", "assisted living"], "tags": {"amenity": "social_facility", "social_facility": "group_home", "social_facility:for": "senior"}, "reference": {"key": "social_facility", "value": "group_home"}, "name": "Elderly Group Home"},
@@ -215,8 +215,8 @@
"attraction/big_wheel": {"icon": "maki-amusement-park", "fields": ["{attraction}", "height"], "geometry": ["point"], "terms": ["ferris wheel", "theme park", "amusement ride"], "tags": {"attraction": "big_wheel"}, "name": "Big Wheel"},
"attraction/bumper_car": {"icon": "maki-car", "geometry": ["point", "area"], "terms": ["theme park", "dodgem cars", "autoscooter"], "tags": {"attraction": "bumper_car"}, "name": "Bumper Car"},
"attraction/bungee_jumping": {"icon": "maki-pitch", "fields": ["{attraction}", "height"], "geometry": ["point", "area"], "terms": ["theme park", "bungy jumping", "jumping platform"], "tags": {"attraction": "bungee_jumping"}, "name": "Bungee Jumping"},
"attraction/carousel": {"icon": "temaki-amusement_park", "geometry": ["point", "area"], "terms": ["theme park", "roundabout", "merry-go-round", "galloper", "jumper", "horseabout", "flying horses"], "tags": {"attraction": "carousel"}, "name": "Carousel"},
"attraction/dark_ride": {"icon": "maki-rail-metro", "geometry": ["point", "line", "area"], "terms": ["theme park", "ghost train"], "tags": {"attraction": "dark_ride"}, "name": "Dark Ride"},
"attraction/carousel": {"icon": "temaki-amusement_park", "fields": ["{attraction}", "building_area"], "geometry": ["point", "area"], "terms": ["theme park", "roundabout", "merry-go-round", "galloper", "jumper", "horseabout", "flying horses"], "tags": {"attraction": "carousel"}, "name": "Carousel"},
"attraction/dark_ride": {"icon": "maki-rail-metro", "fields": ["{attraction}", "building_area"], "geometry": ["point", "line", "area"], "terms": ["theme park", "ghost train"], "tags": {"attraction": "dark_ride"}, "name": "Dark Ride"},
"attraction/drop_tower": {"icon": "temaki-tower", "fields": ["{attraction}", "height"], "geometry": ["point", "area"], "terms": ["theme park", "amusement ride", "gondola", "tower", "big drop"], "tags": {"attraction": "drop_tower"}, "name": "Drop Tower"},
"attraction/maze": {"icon": "maki-amusement-park", "geometry": ["point", "area"], "terms": ["theme park", "amusement ride", "labyrinth"], "tags": {"attraction": "maze"}, "name": "Maze"},
"attraction/pirate_ship": {"icon": "maki-danger", "geometry": ["point"], "terms": ["theme park", "carnival ride", "amusement ride"], "tags": {"attraction": "pirate_ship"}, "name": "Pirate Ship"},
@@ -441,7 +441,7 @@
"highway/secondary": {"icon": "iD-highway-secondary", "fields": ["{highway/primary}"], "moreFields": ["{highway/primary}"], "geometry": ["line"], "tags": {"highway": "secondary"}, "terms": ["road", "street"], "name": "Secondary Road"},
"highway/service": {"icon": "iD-highway-service", "fields": ["name", "service", "oneway", "maxspeed", "surface", "structure", "access"], "moreFields": ["covered", "lanes", "lit", "maxheight", "maxspeed/advisory", "oneway/bicycle"], "geometry": ["line"], "tags": {"highway": "service"}, "terms": ["road", "street"], "name": "Service Road"},
"highway/service/alley": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "alley"}, "reference": {"key": "service", "value": "alley"}, "name": "Alley"},
"highway/service/drive-through": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "drive-through"}, "reference": {"key": "service", "value": "drive-through"}, "name": "Drive-Through"},
"highway/service/drive-through": {"icon": "iD-highway-service", "fields": ["{highway/service}", "covered"], "geometry": ["line"], "tags": {"highway": "service", "service": "drive-through"}, "reference": {"key": "service", "value": "drive-through"}, "name": "Drive-Through"},
"highway/service/driveway": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "driveway"}, "reference": {"key": "service", "value": "driveway"}, "name": "Driveway"},
"highway/service/emergency_access": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "emergency_access"}, "reference": {"key": "service", "value": "emergency_access"}, "name": "Emergency Access"},
"highway/service/parking_aisle": {"icon": "iD-highway-service", "geometry": ["line"], "tags": {"highway": "service", "service": "parking_aisle"}, "reference": {"key": "service", "value": "parking_aisle"}, "name": "Parking Aisle"},
@@ -661,11 +661,12 @@
"natural/tree": {"icon": "maki-park", "fields": ["leaf_type_singular", "leaf_cycle_singular", "denotation"], "geometry": ["point", "vertex"], "tags": {"natural": "tree"}, "terms": [], "name": "Tree"},
"natural/volcano": {"icon": "maki-volcano", "fields": ["name", "elevation", "volcano/status", "volcano/type"], "geometry": ["point", "vertex"], "tags": {"natural": "volcano"}, "terms": ["mountain", "crater"], "name": "Volcano"},
"natural/water": {"icon": "maki-water", "fields": ["water"], "geometry": ["area"], "tags": {"natural": "water"}, "name": "Water"},
"natural/water/basin": {"icon": "maki-water", "fields": ["name", "basin", "intermittent_yes"], "geometry": ["area"], "tags": {"natural": "water", "water": "basin"}, "reference": {"key": "water", "value": "basin"}, "terms": ["detention", "drain", "overflow", "rain", "retention"], "name": "Basin"},
"natural/water/canal": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "canal"}, "reference": {"key": "water", "value": "canal"}, "name": "Canal"},
"natural/water/lake": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "lake"}, "reference": {"key": "water", "value": "lake"}, "terms": ["lakelet", "loch", "mere"], "name": "Lake"},
"natural/water/pond": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "pond"}, "reference": {"key": "water", "value": "pond"}, "terms": ["lakelet", "millpond", "tarn", "pool", "mere"], "name": "Pond"},
"natural/water/reservoir": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "reservoir"}, "reference": {"key": "water", "value": "reservoir"}, "name": "Reservoir"},
"natural/water/river": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "river"}, "reference": {"key": "water", "value": "river"}, "terms": ["beck", "branch", "brook", "course", "creek", "estuary", "rill", "rivulet", "run", "runnel", "stream", "tributary", "watercourse"], "name": "River"},
"natural/water/river": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "river"}, "reference": {"key": "water", "value": "river"}, "terms": ["beck", "branch", "brook", "course", "creek", "estuary", "rill", "riverbank", "rivulet", "run", "runnel", "stream", "tributary", "watercourse"], "name": "River"},
"natural/water/stream": {"icon": "maki-water", "fields": ["name", "intermittent"], "geometry": ["area"], "tags": {"natural": "water", "water": "stream"}, "reference": {"key": "water", "value": "stream"}, "terms": ["beck", "branch", "brook", "burn", "course", "creek", "current", "drift", "flood", "flow", "freshet", "race", "rill", "rindle", "rivulet", "run", "runnel", "rush", "spate", "spritz", "surge", "tide", "torrent", "tributary", "watercourse"], "name": "Stream"},
"natural/wetland": {"icon": "maki-wetland", "fields": ["wetland"], "geometry": ["point", "area"], "tags": {"natural": "wetland"}, "terms": ["bog", "marsh", "reedbed", "swamp", "tidalflat"], "name": "Wetland"},
"natural/wood": {"icon": "maki-park-alt1", "fields": ["name", "leaf_type", "leaf_cycle"], "geometry": ["point", "area"], "tags": {"natural": "wood"}, "terms": ["tree"], "name": "Wood"},
@@ -810,25 +811,25 @@
"railway/platform": {"icon": "iD-highway-footway", "fields": ["name", "ref_platform", "surface", "lit", "shelter"], "geometry": ["line", "area"], "tags": {"railway": "platform"}, "name": "Train Stop / Platform", "searchable": false},
"railway/station": {"icon": "maki-rail", "fields": ["name", "network", "operator", "address", "building_area", "internet_access", "internet_access/fee", "internet_access/ssid"], "geometry": ["point", "vertex", "area"], "tags": {"railway": "station"}, "terms": ["train station", "station"], "name": "Train Station", "searchable": false},
"railway/tram_stop": {"icon": "temaki-tram", "fields": ["name", "network", "operator"], "geometry": ["vertex"], "tags": {"railway": "tram_stop"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram Stopping Position", "searchable": false},
"railway/abandoned": {"icon": "iD-railway-abandoned", "fields": ["name", "structure", "service_rail", "usage_rail"], "geometry": ["line"], "tags": {"railway": "abandoned"}, "terms": [], "name": "Abandoned Railway"},
"railway/abandoned": {"icon": "iD-railway-abandoned", "fields": ["name", "structure", "service_rail", "usage_rail"], "moreFields": ["covered"], "geometry": ["line"], "tags": {"railway": "abandoned"}, "terms": [], "name": "Abandoned Railway"},
"railway/buffer_stop": {"icon": "temaki-buffer_stop", "geometry": ["vertex"], "tags": {"railway": "buffer_stop"}, "terms": ["stop", "halt", "buffer"], "name": "Buffer Stop"},
"railway/crossing": {"icon": "temaki-pedestrian", "geometry": ["vertex"], "tags": {"railway": "crossing"}, "terms": ["crossing", "pedestrian crossing", "railroad crossing", "level crossing", "grade crossing", "path through railroad", "train crossing"], "name": "Railway Crossing (Path)"},
"railway/derail": {"icon": "maki-roadblock", "geometry": ["vertex"], "tags": {"railway": "derail"}, "terms": ["derailer"], "name": "Railway Derailer"},
"railway/disused": {"icon": "iD-railway-disused", "fields": ["structure", "service_rail", "usage_rail"], "geometry": ["line"], "tags": {"railway": "disused"}, "terms": [], "name": "Disused Railway"},
"railway/disused": {"icon": "iD-railway-disused", "fields": ["structure", "service_rail", "usage_rail"], "moreFields": ["covered"], "geometry": ["line"], "tags": {"railway": "disused"}, "terms": [], "name": "Disused Railway"},
"railway/funicular": {"icon": "iD-railway-rail", "geometry": ["line"], "terms": ["venicular", "cliff railway", "cable car", "cable railway", "funicular railway"], "fields": ["structure", "gauge", "service_rail"], "tags": {"railway": "funicular"}, "name": "Funicular"},
"railway/level_crossing": {"icon": "maki-cross", "geometry": ["vertex"], "tags": {"railway": "level_crossing"}, "terms": ["crossing", "railroad crossing", "level crossing", "grade crossing", "road through railroad", "train crossing"], "name": "Railway Crossing (Road)"},
"railway/light_rail": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"},
"railway/light_rail": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "light_rail"}, "terms": ["light rail", "streetcar", "trolley"], "name": "Light Rail"},
"railway/milestone": {"icon": "temaki-milestone", "geometry": ["point", "vertex"], "fields": ["railway/position", "direction_vertex"], "tags": {"railway": "milestone"}, "terms": ["milestone", "marker"], "name": "Railway Milestone"},
"railway/miniature": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "miniature"}, "terms": ["rideable miniature railway", "narrow gauge railway", "minimum gauge railway"], "name": "Miniature Railway"},
"railway/monorail": {"icon": "iD-railway-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"},
"railway/narrow_gauge": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "narrow_gauge"}, "terms": ["narrow gauge railway", "narrow gauge railroad"], "name": "Narrow Gauge Rail"},
"railway/rail": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "rail"}, "terms": [], "name": "Rail"},
"railway/miniature": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "miniature"}, "terms": ["rideable miniature railway", "narrow gauge railway", "minimum gauge railway"], "name": "Miniature Railway"},
"railway/monorail": {"icon": "iD-railway-monorail", "fields": ["name", "structure", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "monorail"}, "terms": [], "name": "Monorail"},
"railway/narrow_gauge": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "narrow_gauge"}, "terms": ["narrow gauge railway", "narrow gauge railroad"], "name": "Narrow Gauge Rail"},
"railway/rail": {"icon": "iD-railway-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "rail"}, "terms": [], "name": "Rail"},
"railway/signal": {"icon": "temaki-railway_signals", "geometry": ["point", "vertex"], "fields": ["railway/position", "railway/signal/direction", "ref"], "tags": {"railway": "signal"}, "terms": ["signal", "lights"], "name": "Railway Signal"},
"railway/subway_entrance": {"icon": "maki-entrance", "geometry": ["point", "vertex"], "fields": ["name"], "tags": {"railway": "subway_entrance"}, "terms": ["metro", "transit"], "name": "Subway Entrance"},
"railway/subway": {"icon": "iD-railway-subway", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "subway"}, "terms": ["metro", "transit"], "name": "Subway"},
"railway/switch": {"icon": "temaki-junction", "geometry": ["vertex"], "tags": {"railway": "switch"}, "terms": ["switch", "points"], "name": "Railway Switch"},
"railway/train_wash": {"icon": "maki-rail", "geometry": ["point", "vertex", "area"], "fields": ["operator", "building_area"], "tags": {"railway": "wash"}, "terms": ["wash", "clean"], "name": "Train Wash"},
"railway/tram": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["maxspeed", "voltage_electrified", "frequency_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"},
"railway/tram": {"icon": "iD-railway-light-rail", "fields": ["name", "structure", "gauge", "electrified", "service_rail", "usage_rail"], "moreFields": ["covered", "frequency_electrified", "maxspeed", "voltage_electrified"], "geometry": ["line"], "tags": {"railway": "tram"}, "terms": ["light rail", "streetcar", "tram", "trolley"], "name": "Tram"},
"relation": {"icon": "iD-relation", "fields": ["name", "relation"], "geometry": ["relation"], "tags": {}, "name": "Relation"},
"route/ferry": {"icon": "iD-ferry-line", "geometry": ["line"], "fields": ["name", "operator", "duration", "access", "to", "from"], "tags": {"route": "ferry"}, "name": "Ferry Route"},
"seamark/beacon_isolated_danger": {"fields": ["ref", "operator", "seamark/beacon_isolated_danger/shape", "seamark/type"], "geometry": ["point", "vertex"], "terms": ["beacon isolated danger", "isolated danger beacon", "iala"], "tags": {"seamark:type": "beacon_isolated_danger"}, "name": "Danger Beacon"},
@@ -1054,7 +1055,7 @@
"type/route/tram": {"icon": "iD-route-tram", "fields": ["name", "ref_route", "operator", "network", "to", "from"], "geometry": ["relation"], "tags": {"type": "route", "route": "tram"}, "name": "Tram Route"},
"type/site": {"icon": "iD-relation", "fields": ["name", "site"], "geometry": ["relation"], "tags": {"type": "site"}, "name": "Site"},
"type/waterway": {"icon": "iD-route-water", "fields": ["name", "waterway", "ref"], "geometry": ["relation"], "tags": {"type": "waterway"}, "name": "Waterway"},
"vertex": {"fields": ["name"], "geometry": ["vertex"], "tags": {}, "name": "Other", "matchScore": 0.1},
"vertex": {"moreFields": ["name"], "geometry": ["vertex"], "tags": {}, "name": "Other", "matchScore": 0.1},
"waterway/riverbank": {"icon": "maki-water", "geometry": ["area"], "tags": {"waterway": "riverbank"}, "name": "Riverbank", "searchable": false},
"waterway/boatyard": {"icon": "maki-harbor", "fields": ["name", "operator"], "moreFields": ["address", "website", "phone", "email", "fax", "wheelchair"], "geometry": ["area", "vertex", "point"], "tags": {"waterway": "boatyard"}, "name": "Boatyard"},
"waterway/canal": {"icon": "iD-waterway-canal", "fields": ["name", "width", "intermittent"], "geometry": ["line"], "tags": {"waterway": "canal"}, "name": "Canal"},
+2 -1
View File
@@ -12,7 +12,8 @@
"brand",
"lit",
"opening_hours",
"wheelchair"
"wheelchair",
"covered"
],
"geometry": [
"point",
+3 -2
View File
@@ -7,8 +7,9 @@
"colour"
],
"moreFields": [
"lit",
"access_simple"
"access_simple",
"inscription",
"lit"
],
"geometry": [
"point",
@@ -9,7 +9,8 @@
"fee"
],
"moreFields": [
"payment_multi"
"payment_multi",
"covered"
],
"geometry": [
"point",
@@ -14,7 +14,8 @@
"phone",
"email",
"fax",
"wheelchair"
"wheelchair",
"covered"
],
"geometry": [
"point",
@@ -8,7 +8,8 @@
"service/bicycle"
],
"moreFields": [
"payment_multi"
"payment_multi",
"covered"
],
"geometry": [
"point",
@@ -7,7 +7,8 @@
"wheelchair"
],
"moreFields": [
"lit"
"lit",
"covered"
],
"geometry": [
"point"
@@ -16,8 +17,11 @@
"amenity": "drinking_water"
},
"terms": [
"fountain",
"potable"
"potable water source",
"water fountain",
"drinking fountain",
"bubbler",
"water tap"
],
"name": "Drinking Water"
}
+2 -1
View File
@@ -19,7 +19,8 @@
"phone",
"email",
"fax",
"wheelchair"
"wheelchair",
"covered"
],
"geometry": [
"point",
@@ -9,7 +9,8 @@
],
"moreFields": [
"lit",
"wheelchair"
"wheelchair",
"covered"
],
"geometry": [
"point",
@@ -1,5 +1,9 @@
{
"icon": "temaki-amusement_park",
"fields": [
"{attraction}",
"building_area"
],
"geometry": [
"point",
"area"
@@ -1,5 +1,9 @@
{
"icon": "maki-rail-metro",
"fields": [
"{attraction}",
"building_area"
],
"geometry": [
"point",
"line",
@@ -1,5 +1,9 @@
{
"icon": "iD-highway-service",
"fields": [
"{highway/service}",
"covered"
],
"geometry": [
"line"
],
@@ -0,0 +1,27 @@
{
"icon": "maki-water",
"fields": [
"name",
"basin",
"intermittent_yes"
],
"geometry": [
"area"
],
"tags": {
"natural": "water",
"water": "basin"
},
"reference": {
"key": "water",
"value": "basin"
},
"terms": [
"detention",
"drain",
"overflow",
"rain",
"retention"
],
"name": "Basin"
}
@@ -23,6 +23,7 @@
"creek",
"estuary",
"rill",
"riverbank",
"rivulet",
"run",
"runnel",
@@ -6,6 +6,9 @@
"service_rail",
"usage_rail"
],
"moreFields": [
"covered"
],
"geometry": [
"line"
],
@@ -5,6 +5,9 @@
"service_rail",
"usage_rail"
],
"moreFields": [
"covered"
],
"geometry": [
"line"
],
+3 -2
View File
@@ -9,9 +9,10 @@
"usage_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
+3 -2
View File
@@ -8,9 +8,10 @@
"service_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
+3 -2
View File
@@ -8,9 +8,10 @@
"usage_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
@@ -9,9 +9,10 @@
"usage_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
+3 -2
View File
@@ -9,9 +9,10 @@
"usage_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
+3 -2
View File
@@ -9,9 +9,10 @@
"usage_rail"
],
"moreFields": [
"covered",
"frequency_electrified",
"maxspeed",
"voltage_electrified",
"frequency_electrified"
"voltage_electrified"
],
"geometry": [
"line"
+1 -1
View File
@@ -1,5 +1,5 @@
{
"fields": [
"moreFields": [
"name"
],
"geometry": [
+1
View File
@@ -645,6 +645,7 @@
{"key": "natural", "value": "tree_row", "description": "🄿 Tree Row", "object_types": ["way"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/park-15.svg?sanitize=true"},
{"key": "natural", "value": "tree", "description": "🄿 Tree", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/park-15.svg?sanitize=true"},
{"key": "natural", "value": "volcano", "description": "🄿 Volcano", "object_types": ["node"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/volcano-15.svg?sanitize=true"},
{"key": "water", "value": "basin", "description": "🄿 Basin", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"},
{"key": "water", "value": "canal", "description": "🄿 Canal", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"},
{"key": "water", "value": "lake", "description": "🄿 Lake", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"},
{"key": "water", "value": "pond", "description": "🄿 Pond", "object_types": ["area"], "icon_url": "https://raw.githubusercontent.com/mapbox/maki/master/icons/water-15.svg?sanitize=true"},
+6 -2
View File
@@ -4036,7 +4036,7 @@
},
"amenity/drinking_water": {
"name": "Drinking Water",
"terms": "fountain,potable"
"terms": "potable water source,water fountain,drinking fountain,bubbler,water tap"
},
"amenity/driving_school": {
"name": "Driving School",
@@ -6350,6 +6350,10 @@
"name": "Water",
"terms": ""
},
"natural/water/basin": {
"name": "Basin",
"terms": "detention,drain,overflow,rain,retention"
},
"natural/water/canal": {
"name": "Canal",
"terms": ""
@@ -6368,7 +6372,7 @@
},
"natural/water/river": {
"name": "River",
"terms": "beck,branch,brook,course,creek,estuary,rill,rivulet,run,runnel,stream,tributary,watercourse"
"terms": "beck,branch,brook,course,creek,estuary,rill,riverbank,rivulet,run,runnel,stream,tributary,watercourse"
},
"natural/water/stream": {
"name": "Stream",
+2 -2
View File
@@ -317,8 +317,8 @@ export function behaviorDrawWay(context, wayId, index, mode, startGraph) {
window.setTimeout(function() {
context.map().dblclickEnable(true);
}, 1000);
context.enter(modeSelect(context, [wayId]).newFeature(true));
var isNewFeature = !mode.isContinuing;
context.enter(modeSelect(context, [wayId]).newFeature(isNewFeature));
};
+3 -2
View File
@@ -2,7 +2,7 @@ import { t } from '../util/locale';
import { behaviorDrawWay } from '../behavior';
export function modeDrawLine(context, wayID, startGraph, affix) {
export function modeDrawLine(context, wayID, startGraph, affix, continuing) {
var mode = {
button: 'line',
id: 'draw-line'
@@ -10,13 +10,14 @@ export function modeDrawLine(context, wayID, startGraph, affix) {
var behavior;
mode.isContinuing = continuing;
mode.enter = function() {
var way = context.entity(wayID);
var index = (affix === 'prefix') ? 0 : undefined;
var headID = (affix === 'prefix') ? way.first() : way.last();
behavior = behaviorDrawWay(context, wayID, index, mode, startGraph)
behavior = behaviorDrawWay(context, wayID, index, mode, startGraph, continuing)
.tail(t('modes.draw_line.tail'));
var addNode = behavior.addNode;
+1 -1
View File
@@ -27,7 +27,7 @@ export function operationContinue(selectedIDs, context) {
var operation = function() {
var candidate = candidateWays()[0];
context.enter(
modeDrawLine(context, candidate.id, context.graph(), candidate.affix(vertex.id))
modeDrawLine(context, candidate.id, context.graph(), candidate.affix(vertex.id), true)
);
};
+66 -68
View File
@@ -11,11 +11,10 @@ import { utilGetSetValue, utilRebind, utilTriggerEvent } from '../util';
// This code assumes that the combobox values will not have duplicate entries.
// It is keyed on the `value` of the entry.
// Data should be an array of objects like:
// It is keyed on the `value` of the entry. Data should be an array of objects like:
// [{
// title: 'hover text',
// value: 'display text'
// value: 'display text', // required
// title: 'hover text' // optional
// }, ...]
var _comboHideTimerID;
@@ -25,7 +24,8 @@ export function uiCombobox(context, klass) {
var container = context.container();
var _suggestions = [];
var _values = [];
var _data = [];
var _fetched = {};
var _selected = null;
var _canAutocomplete = true;
var _caseSensitive = false;
@@ -34,7 +34,7 @@ export function uiCombobox(context, klass) {
var _tDown = 0;
var _fetcher = function(val, cb) {
cb(_values.filter(function(d) {
cb(_data.filter(function(d) {
return d.value
.toString()
.toLowerCase()
@@ -47,43 +47,49 @@ export function uiCombobox(context, klass) {
input
.classed('combobox-input', true)
.on('focus.combobox', focus)
.on('blur.combobox', blur)
.on('keydown.combobox', keydown)
.on('keyup.combobox', keyup)
.on('input.combobox', change)
.on('mousedown.combobox', mousedown)
.each(addCaret);
.on('focus.combo-input', focus)
.on('blur.combo-input', blur)
.on('keydown.combo-input', keydown)
.on('keyup.combo-input', keyup)
.on('input.combo-input', change)
.on('mousedown.combo-input', mousedown)
.each(function() {
var parent = this.parentNode;
var sibling = this.nextSibling;
function addCaret() {
var parent = this.parentNode;
var sibling = this.nextSibling;
d3_select(parent).selectAll('.combobox-caret')
.filter(function(d) { return d === input.node(); })
.data([input.node()])
.enter()
.insert('div', function() { return sibling; })
.attr('class', 'combobox-caret');
}
d3_select(parent).selectAll('.combobox-caret')
.filter(function(d) { return d === input.node(); })
.data([input.node()])
.enter()
.insert('div', function() { return sibling; })
.attr('class', 'combobox-caret')
.on('mousedown.combo-caret mouseup.combo-caret', function() {
var e2 = new MouseEvent(d3_event.type, d3_event);
d3_event.preventDefault(); // don't steal focus from input
input.node().dispatchEvent(e2); // send events to the input instead
});
});
function mousedown() {
if (d3_event.button !== 0) return; // left click only
_tDown = +new Date();
// clear selection
var start = input.property('selectionStart');
var end = input.property('selectionEnd');
if (start !== end) return; // exit if user is deselecting
if (start !== end) {
var val = utilGetSetValue(input);
input.node().setSelectionRange(val.length, val.length);
return;
}
_tDown = +new Date();
input.on('mouseup.combobox', mouseup);
input.on('mouseup.combo-input', mouseup);
}
function mouseup() {
input.on('mouseup.combobox', null);
input.on('mouseup.combo-input', null);
if (d3_event.button !== 0) return; // left click only
var start = input.property('selectionStart');
@@ -100,7 +106,7 @@ export function uiCombobox(context, klass) {
show();
render();
});
}, 75);
}, 250);
} else {
hide();
@@ -128,13 +134,13 @@ export function uiCombobox(context, klass) {
.style('position', 'absolute')
.style('display', 'block')
.style('left', '0px')
.on('mousedown.combobox', function () {
.on('mousedown.combo-container', function () {
// prevent moving focus out of the input field
d3_event.preventDefault();
});
d3_select('body')
.on('scroll.combobox', render, true);
.on('scroll.combo-scroll', render, true);
}
@@ -148,7 +154,7 @@ export function uiCombobox(context, klass) {
.remove();
d3_select('body')
.on('scroll.combobox', null);
.on('scroll.combo-scroll', null);
}
@@ -162,10 +168,10 @@ export function uiCombobox(context, klass) {
d3_event.stopPropagation();
_selected = null;
render();
input.on('input.combobox', function() {
input.on('input.combo-input', function() {
var start = input.property('selectionStart');
input.node().setSelectionRange(start, start);
input.on('input.combobox', change);
input.on('input.combo-input', change);
});
break;
@@ -213,18 +219,6 @@ export function uiCombobox(context, klass) {
}
// return the datum for the currently chosen value
function datum(val) {
for (var i = 0; i < _suggestions.length; i++) {
var suggestion = _suggestions[i];
if (suggestion.value === val) {
return suggestion;
}
}
return null;
}
// Called whenever the input value is changed (e.g. on typing)
function change() {
fetch(value(), function() {
@@ -237,7 +231,7 @@ export function uiCombobox(context, klass) {
}
if (!_selected) {
_selected = datum(val);
_selected = val;
}
}
@@ -261,7 +255,7 @@ export function uiCombobox(context, klass) {
// try to determine previously selected index..
var index = -1;
for (var i = 0; i < _suggestions.length; i++) {
if (_selected && _suggestions[i].value === _selected.value) {
if (_selected && _suggestions[i].value === _selected) {
index = i;
break;
}
@@ -269,8 +263,8 @@ export function uiCombobox(context, klass) {
// pick new _selected
index = Math.max(Math.min(index + dir, _suggestions.length - 1), 0);
_selected = _suggestions[index];
input.property('value', _selected.value);
_selected = _suggestions[index].value;
input.property('value', _selected);
}
render();
@@ -316,8 +310,12 @@ export function uiCombobox(context, klass) {
_cancelFetch = false;
_fetcher.call(input, v, function(results) {
// already chose a value, don't overwrite or autocomplete it
if (_cancelFetch) return;
_suggestions = results;
results.forEach(function(d) { _fetched[d.value] = d; });
if (cb) {
cb();
}
@@ -354,7 +352,7 @@ export function uiCombobox(context, klass) {
var bestVal = _suggestions[bestIndex].value;
input.property('value', bestVal);
input.node().setSelectionRange(val.length, bestVal.length);
return _suggestions[bestIndex];
return bestVal;
}
}
@@ -379,11 +377,11 @@ export function uiCombobox(context, klass) {
options.enter()
.append('a')
.attr('class', 'combobox-option')
.text(function(d) { return d.value; })
.merge(options)
.attr('title', function(d) { return d.title; })
.classed('selected', function(d) { return d === _selected; })
.on('click.combobox', accept)
.text(function(d) { return d.display || d.value; })
.merge(options)
.classed('selected', function(d) { return d.value === _selected; })
.on('click.combo-option', accept)
.order();
var node = attachTo ? attachTo.node() : input.node();
@@ -411,7 +409,7 @@ export function uiCombobox(context, klass) {
var val = utilGetSetValue(input);
thiz.setSelectionRange(val.length, val.length);
d = datum(val);
d = _fetched[val];
dispatch.call('accept', thiz, d, val);
hide();
}
@@ -451,8 +449,8 @@ export function uiCombobox(context, klass) {
};
combobox.data = function(val) {
if (!arguments.length) return _values;
_values = val;
if (!arguments.length) return _data;
_data = val;
return combobox;
};
@@ -475,15 +473,15 @@ export function uiCombobox(context, klass) {
uiCombobox.off = function(input) {
input
.on('focus.combobox', null)
.on('blur.combobox', null)
.on('keydown.combobox', null)
.on('keyup.combobox', null)
.on('input.combobox', null)
.on('mousedown.combobox', null)
.on('mouseup.combobox', null);
.on('focus.combo-input', null)
.on('blur.combo-input', null)
.on('keydown.combo-input', null)
.on('keyup.combo-input', null)
.on('input.combo-input', null)
.on('mousedown.combo-input', null)
.on('mouseup.combo-input', null);
d3_select('body')
.on('scroll.combobox', null);
.on('scroll.combo-scroll', null);
};
+6 -4
View File
@@ -223,10 +223,12 @@ export function uiFieldLocalized(field, context) {
// NOTE: split/join on en-dash, not a hypen (to avoid conflict with fr - nl names in Brussels etc)
var name = utilGetSetValue(input);
var parts = name.split(' ');
parts.pop();
name = parts.join(' ');
utilGetSetValue(input, name);
dispatch.call('change', this, { name: name });
if (parts.length > 1) {
parts.pop();
name = parts.join(' ');
utilGetSetValue(input, name);
dispatch.call('change', this, { name: name });
}
}
+2 -1
View File
@@ -326,7 +326,8 @@ export function utilNoAuto(selection) {
var isText = (selection.size() && selection.node().tagName.toLowerCase() === 'textarea');
return selection
.attr('autocomplete', 'off')
// assign 'new-password' even for non-password fields to prevent browsers (Chrome) ignoring 'off'
.attr('autocomplete', 'new-password')
.attr('autocorrect', 'off')
.attr('autocapitalize', 'off')
.attr('spellcheck', isText ? 'true' : 'false');
+5 -3
View File
@@ -18,7 +18,7 @@ describe('uiCombobox', function() {
iD.d3.customEvent(happen.makeEvent({
type: 'keydown',
keyCode: keyCode
}), input.on('keydown.combobox'));
}), input.on('keydown.combo-input'));
switch (key) {
case '⇥':
@@ -80,7 +80,7 @@ describe('uiCombobox', function() {
function focusTypeahead(input) {
input.node().focus();
d3.customEvent(happen.makeEvent('focus'), input.on('focus.combobox'));
d3.customEvent(happen.makeEvent('focus'), input.on('focus.combo-input'));
}
it('adds the combobox-input class', function() {
@@ -105,7 +105,7 @@ describe('uiCombobox', function() {
expect(body.selectAll('.combobox-option').nodes()[2].text).to.equal('Baz');
});
it('shows all entries when clicking on the caret', function() {
it('shows all entries when activating the combo', function() {
input.property('value', 'foobar').call(combobox.data(data));
focusTypeahead(input);
simulateKeypress('↓');
@@ -238,6 +238,7 @@ describe('uiCombobox', function() {
it('emits accepted event with selected datum on ⇥', function(done) {
combobox.on('accept', function(d) {
expect(d).to.eql({title: 'bar', value: 'bar'});
combobox.on('accept', null);
done();
});
input.call(combobox.data(data));
@@ -249,6 +250,7 @@ describe('uiCombobox', function() {
it('emits accepted event with selected datum on ↩', function(done) {
combobox.on('accept', function(d) {
expect(d).to.eql({title: 'bar', value: 'bar'});
combobox.on('accept', null);
done();
});
input.call(combobox.data(data));