Skip to content

Commit 7a2a995

Browse files
authored
Merge pull request #384 from OpenHistoricalMap/id-2.29.6
incorporate our iD v2.29.6
2 parents 9d258f5 + 7ad2415 commit 7a2a995

116 files changed

Lines changed: 49011 additions & 38122 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/assets/javascripts/index/query.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ OSM.Query = function (map) {
100100

101101
if (prefixes[key]) {
102102
const first = value.slice(0, 1).toUpperCase(),
103-
rest = value.slice(1).replace(/_/g, " ");
103+
rest = value.slice(1).replace(/_/g, " ");
104104

105105
return first + rest;
106106
}
@@ -162,7 +162,7 @@ OSM.Query = function (map) {
162162

163163
function featureName(feature) {
164164
const tags = feature.tags,
165-
localeKeys = OSM.preferred_languages.map(locale => `name:${locale}`);
165+
localeKeys = OSM.preferred_languages.map(locale => `name:${locale}`);
166166

167167
for (const key of [...localeKeys, "name", "ref", "addr:housename"]) {
168168
if (tags[key]) return tags[key];
@@ -338,19 +338,21 @@ OSM.Query = function (map) {
338338
/*
339339
* QUERY MECHANISM:
340340
*
341-
* To find nearby objects we ask Overpass for the union of the following sets:
341+
* To find nearby objects we ask overpass for the union of the
342+
* following sets:
342343
* node(around:<radius>,<lat>,<lng>)
343344
* way(around:<radius>,<lat>,<lng>)
344345
* relation(around:<radius>,<lat>,<lng>)
345346
*
346-
* To find enclosing objects we first find all the enclosing areas:
347+
* to find enclosing objects we first find all the enclosing areas:
347348
* is_in(<lat>,<lng>)->.a
348349
*
349350
* and then return the union of the following sets:
350351
* relation(pivot.a)
351352
* way(pivot.a)
352353
*
353-
* In both cases we then ask to retrieve tags and the geometry for each object.
354+
* In both cases we then ask to retrieve tags and the geometry
355+
* for each object.
354356
*
355357
* TEMPORAL FILTERING (OpenHistoricalMap - Added Feature):
356358
* Filter objects to only include those that existed at the time slider date.
@@ -368,13 +370,13 @@ OSM.Query = function (map) {
368370
*/
369371
function queryOverpass(latlng) {
370372
const bounds = map.getBounds(),
371-
zoom = map.getZoom(),
372-
bbox = [bounds.getSouthWest(), bounds.getNorthEast()]
373-
.map(c => OSM.cropLocation(c, zoom))
374-
.join(),
375-
geom = `geom(${bbox})`,
376-
radius = 10 * Math.pow(1.5, 19 - zoom),
377-
here = `(around:${radius},${latlng})`;
373+
zoom = map.getZoom(),
374+
bbox = [bounds.getSouthWest(), bounds.getNorthEast()]
375+
.map(c => OSM.cropLocation(c, zoom))
376+
.join(),
377+
geom = `geom(${bbox})`,
378+
radius = 10 * Math.pow(1.5, 19 - zoom),
379+
here = `(around:${radius},${latlng})`;
378380

379381
let dateFilter = ""; // OverpassQL filter (dates >= 1000 CE)
380382
let jsDateFilter = null; // JavaScript filter (dates < 1000 CE)

app/controllers/searches/latlon_queries_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Searches
24
class LatlonQueriesController < QueriesController
35
def create

app/controllers/searches/nominatim_queries_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Searches
24
class NominatimQueriesController < QueriesController
35
require "date_range"

app/controllers/searches/nominatim_reverse_queries_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Searches
24
class NominatimReverseQueriesController < QueriesController
35
include NominatimMethods

app/controllers/searches/queries_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module Searches
24
class QueriesController < ApplicationController
35
before_action :authorize_web

app/controllers/searches_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class SearchesController < ApplicationController
24
include NominatimMethods
35

vendor/assets/iD/iD.css.erb

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,11 @@
699699
stroke-linecap: round;
700700
pointer-events: none;
701701
}
702+
.ideditor g.auxiliary path.preview {
703+
stroke: #ccc;
704+
stroke-width: 2;
705+
stroke-dasharray: 8, 4;
706+
}
702707

703708
/* Visual Diffs
704709
------------------
@@ -1741,8 +1746,11 @@
17411746
}
17421747

17431748
/* steps */
1744-
.ideditor .preset-icon .icon.tag-highway-steps,
17451749
.ideditor .preset-icon .icon.tag-highway-ladder {
1750+
color: #6f1f1f;
1751+
fill: #fff;
1752+
}
1753+
.ideditor .preset-icon .icon.tag-highway-steps {
17461754
color: #81d25c;
17471755
fill: #fff;
17481756
}
@@ -1761,10 +1769,12 @@
17611769
stroke-linecap: round;
17621770
stroke-dasharray: none;
17631771
}
1764-
.ideditor path.line.stroke.tag-highway-steps,
17651772
.ideditor path.line.stroke.tag-highway-ladder,
1766-
.ideditor .preset-icon-container path.line.casing.tag-highway-steps,
17671773
.ideditor .preset-icon-container path.line.casing.tag-highway-ladder {
1774+
stroke: #6f1f1f;
1775+
}
1776+
.ideditor path.line.stroke.tag-highway-steps,
1777+
.ideditor .preset-icon-container path.line.casing.tag-highway-steps {
17681778
stroke: #81d25c;
17691779
}
17701780
.ideditor .preset-icon-container path.line.stroke.tag-highway-steps,
@@ -4640,21 +4650,28 @@
46404650

46414651
/* Hide/Toggle collapsible sections (aka Disclosure)
46424652
------------------------------------------------------- */
4653+
.ideditor summary.hide-toggle {
4654+
display: block;
4655+
list-style: none;
4656+
cursor: pointer;
4657+
color: var(--link-color);
4658+
font-size: 14px;
4659+
font-weight: bold;
4660+
line-height: 25px;
4661+
}
4662+
.ideditor details.disclosure-wrap[open] summary.hide-toggle {
4663+
margin-bottom: 10px;
4664+
}
4665+
.ideditor summary.hide-toggle::-webkit-details-marker {
4666+
display: none;
4667+
}
46434668
.ideditor .hide-toggle .icon.pre-text {
46444669
vertical-align: middle;
46454670
width: 16px;
46464671
height: 16px;
46474672
margin-top: -3px;
46484673
}
46494674

4650-
.ideditor a:visited.hide-toggle,
4651-
.ideditor a.hide-toggle {
4652-
display: inline-block;
4653-
font-size: 14px;
4654-
font-weight: bold;
4655-
margin-bottom: 5px;
4656-
}
4657-
46584675

46594676
/* Sidebar / Inspector
46604677
------------------------------------------------------- */
@@ -5302,7 +5319,6 @@
53025319

53035320
.ideditor .label-text .label-textannotation svg.icon {
53045321
margin: 0 8px;
5305-
color: #333;
53065322
opacity: 0.5;
53075323
width: 14px;
53085324
height: 14px;
@@ -5723,11 +5739,24 @@
57235739
padding-left: 0;
57245740
padding-right: 11px;
57255741
}
5742+
.ideditor .combobox-address-street-place .combobox-option,
5743+
.ideditor .combobox-option.has-icon {
5744+
display: flex;
5745+
align-items: center;
5746+
}
5747+
.ideditor .combobox-option.has-icon .combobox-option-label {
5748+
display: flex;
5749+
align-items: center;
5750+
}
57265751
.ideditor .tag-value-icon .icon {
57275752
width: 21px;
57285753
height: 21px;
57295754
margin: auto;
57305755
}
5756+
.ideditor .tag-value-icon .emoji {
5757+
font-size: 24px;
5758+
line-height: 24px;
5759+
}
57315760
.ideditor[dir='ltr'] .form-field-input-combo .tag-value-icon + input,
57325761
.ideditor[dir='ltr'] .form-field-input-semicombo .input-wrap .tag-value-icon + input,
57335762
.ideditor[dir='ltr'] .form-field-input-multicombo .input-wrap .tag-value-icon + input {
@@ -6303,6 +6332,9 @@
63036332
border: 1px solid var(--border-color);
63046333
border-radius: 0 0 4px 4px;
63056334
}
6335+
.ideditor div.combobox:has(.has-description) {
6336+
max-height: 400px;
6337+
}
63066338

63076339
.ideditor .combobox a {
63086340
display: block;
@@ -6354,6 +6386,18 @@
63546386
border-right: 5px solid transparent;
63556387
}
63566388

6389+
.ideditor .combobox .combobox-option.has-description {
6390+
display: flex;
6391+
flex-direction: column;
6392+
align-items: flex-start;
6393+
}
6394+
.ideditor .combobox .combobox-option-description {
6395+
font-size: 11px;
6396+
line-height: 1.3;
6397+
opacity: 0.7;
6398+
white-space: normal;
6399+
padding-top: 2px;
6400+
}
63576401
.ideditor .combobox .combobox-option.raw-option {
63586402
font-family: monospace;
63596403
color: var(--text-color);
@@ -6796,21 +6840,35 @@
67966840
font-weight: normal;
67976841
padding-left: 10px;
67986842
}
6799-
.ideditor .section-raw-member-editor .member-row .member-entity-name.has-colour::before,
6800-
.ideditor .section-raw-membership-editor .member-row .member-entity-name.has-colour::before,
6801-
.ideditor .feature-list .entity-name.has-colour::before,
6843+
68026844
.ideditor .combobox-parent-relation .has-colour::before {
68036845
display: inline-block;
68046846
content: '';
6805-
margin-left: -5px;
6847+
margin-left: 2px;
68066848
margin-right: 5px;
68076849
border-style: solid;
68086850
border-width: 4px;
68096851
border-radius: 4px;
68106852
border-color: inherit;
68116853
}
6812-
.ideditor .combobox-parent-relation .has-colour::before {
6813-
margin-left: 2px;
6854+
.ideditor .section-raw-membership-editor .member-row img.member-entity-icon,
6855+
.ideditor .section-raw-member-editor .member-row img.member-entity-icon {
6856+
display: inline-block;
6857+
width: auto;
6858+
height: 18px;
6859+
margin-left: 5px;
6860+
margin-bottom: -4.5px;
6861+
}
6862+
.ideditor .section-raw-membership-editor .member-row span.member-entity-ref-color,
6863+
.ideditor .section-raw-member-editor .member-row span.member-entity-ref-color,
6864+
.ideditor .feature-list .feature-list-item span.member-entity-ref-color {
6865+
display: inline-block;
6866+
margin-left: 5px;
6867+
margin-right: -5px;
6868+
border-style: solid;
6869+
border-width: 4px;
6870+
border-radius: 10px;
6871+
line-height: 10px;
68146872
}
68156873

68166874
.ideditor[dir='rtl'] .section-raw-member-editor .member-row .member-entity-name,
@@ -8294,7 +8352,7 @@
82948352

82958353
/* Unstyle button fields */
82968354
.ideditor .inspector-hover .form-field-input-radio label.active,
8297-
.ideditor .inspector-hover .entity-editor-pane a.hide-toggle {
8355+
.ideditor .inspector-hover .entity-editor-pane summary.hide-toggle {
82988356
opacity: 1;
82998357
background-color: transparent;
83008358
color: var(--passive-text-color);
@@ -9173,8 +9231,7 @@
91739231
margin-top: 0;
91749232
}
91759233

9176-
.ideditor .community-detail a.hide-toggle,
9177-
.ideditor .community-detail a:visited.hide-toggle {
9234+
.ideditor .community-detail summary.hide-toggle {
91789235
font-size: 12px;
91799236
font-weight: normal;
91809237
padding-bottom: 0;

0 commit comments

Comments
 (0)