mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-02 05:01:38 +02:00
Merge branch 'master' into flexbox-buttons
This commit is contained in:
+2
-2
@@ -26,7 +26,8 @@ path.stroke.tag-landuse,
|
||||
path.stroke.tag-natural,
|
||||
path.stroke.tag-leisure-nature_reserve,
|
||||
path.stroke.tag-leisure-pitch,
|
||||
path.stroke.tag-leisure-park {
|
||||
path.stroke.tag-leisure-park,
|
||||
path.stroke.tag-barrier-hedge {
|
||||
stroke: rgb(140, 208, 95);
|
||||
}
|
||||
path.fill.tag-landuse,
|
||||
@@ -274,4 +275,3 @@ path.fill.tag-natural-glacier {
|
||||
border-color: rgb(170, 170, 170);
|
||||
background: rgba(170, 170, 170, 0.3);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -72,8 +72,10 @@ path.stroke.tag-natural-tree_row {
|
||||
|
||||
|
||||
/* barriers */
|
||||
path.stroke.tag-barrier {
|
||||
path.stroke.tag-barrier:not(.tag-barrier-hedge) {
|
||||
stroke: #ddd;
|
||||
}
|
||||
path.stroke.tag-barrier {
|
||||
stroke-width: 3px;
|
||||
stroke-linecap: round;
|
||||
stroke-dasharray: 15, 5, 1, 5;
|
||||
|
||||
+8
-22
@@ -350,11 +350,7 @@ button.active {
|
||||
}
|
||||
|
||||
button.minor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 10%;
|
||||
border-radius: 0;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
@@ -2148,7 +2144,11 @@ div.combobox {
|
||||
.tag-row {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
.tag-row .inner-wrap {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tag-row.readonly,
|
||||
@@ -2174,14 +2174,9 @@ div.combobox {
|
||||
|
||||
.tag-row .key-wrap,
|
||||
.tag-row .input-wrap-position {
|
||||
width: 40%;
|
||||
float: left;
|
||||
flex: 1 0.5 100%;
|
||||
height: 30px;
|
||||
}
|
||||
[dir='rtl'] .tag-row .key-wrap,
|
||||
[dir='rtl'] .tag-row .input-wrap-position {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.tag-row input.key {
|
||||
font-weight: bold;
|
||||
@@ -2209,15 +2204,13 @@ div.combobox {
|
||||
}
|
||||
|
||||
.tag-row button {
|
||||
position: absolute;
|
||||
height: 31px;
|
||||
right: 10%;
|
||||
flex: 0 0 33px;
|
||||
border: 1px solid #ccc;
|
||||
border-top-width: 0;
|
||||
border-left-width: 0;
|
||||
}
|
||||
[dir='rtl'] .tag-row button {
|
||||
left: 10%;
|
||||
border-left-width: 1px;
|
||||
border-right-width: 0;
|
||||
}
|
||||
@@ -2251,16 +2244,10 @@ div.combobox {
|
||||
}
|
||||
|
||||
.tag-row .tag-reference-button {
|
||||
right: 0;
|
||||
border-radius: 0;
|
||||
width: 10%;
|
||||
top: 0;
|
||||
background: #fafafa;
|
||||
}
|
||||
[dir='rtl'] .tag-row .tag-reference-button {
|
||||
left: auto;
|
||||
right: auto;
|
||||
margin-right: 35px;
|
||||
border-left-width: 1px;
|
||||
border-right-width: 0;
|
||||
}
|
||||
@@ -2316,7 +2303,6 @@ button.minor.tag-reference-loading {
|
||||
}
|
||||
|
||||
.raw-tag-editor .tag-reference-body {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -2325,7 +2311,7 @@ button.minor.tag-reference-loading {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.raw-tag-editor .tag-row:not(:last-child) .tag-reference-body {
|
||||
.raw-tag-editor .tag-row:not(:last-child) .tag-reference-body.expanded {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -118,10 +118,18 @@ en:
|
||||
annotation: Removed a member from a relation.
|
||||
connect:
|
||||
annotation:
|
||||
point: Connected a way to a point.
|
||||
vertex: Connected a way to another.
|
||||
line: Connected a way to a line.
|
||||
area: Connected a way to an area.
|
||||
from_vertex:
|
||||
to_point: Connected a way to a point.
|
||||
to_vertex: Connected a way to another.
|
||||
to_line: Connected a way to a line.
|
||||
to_area: Connected a way to an area.
|
||||
to_adjacent_vertex: Merged adjacent points in a way.
|
||||
to_sibling_vertex: Connected a way to itself.
|
||||
from_point:
|
||||
to_point: Merged a point with another.
|
||||
to_vertex: Merged a point with a point in a way.
|
||||
to_line: Moved a point to a line.
|
||||
to_area: Moved a point to an area.
|
||||
relation: These features can't be connected because they have conflicting relation roles.
|
||||
restriction: "These features can't be connected because it would damage a \"{relation}\" relation."
|
||||
disconnect:
|
||||
|
||||
Vendored
+60
-7
@@ -154,10 +154,20 @@
|
||||
},
|
||||
"connect": {
|
||||
"annotation": {
|
||||
"point": "Connected a way to a point.",
|
||||
"vertex": "Connected a way to another.",
|
||||
"line": "Connected a way to a line.",
|
||||
"area": "Connected a way to an area."
|
||||
"from_vertex": {
|
||||
"to_point": "Connected a way to a point.",
|
||||
"to_vertex": "Connected a way to another.",
|
||||
"to_line": "Connected a way to a line.",
|
||||
"to_area": "Connected a way to an area.",
|
||||
"to_adjacent_vertex": "Merged adjacent points in a way.",
|
||||
"to_sibling_vertex": "Connected a way to itself."
|
||||
},
|
||||
"from_point": {
|
||||
"to_point": "Merged a point with another.",
|
||||
"to_vertex": "Merged a point with a point in a way.",
|
||||
"to_line": "Moved a point to a line.",
|
||||
"to_area": "Moved a point to an area."
|
||||
}
|
||||
},
|
||||
"relation": "These features can't be connected because they have conflicting relation roles.",
|
||||
"restriction": "These features can't be connected because it would damage a \"{relation}\" relation."
|
||||
@@ -7442,11 +7452,33 @@
|
||||
"description": "Japan GSI Standard Map. Widely covered.",
|
||||
"name": "Japan GSI Standard Map"
|
||||
},
|
||||
"hike_n_bike": {
|
||||
"helsingborg-orto": {
|
||||
"attribution": {
|
||||
"text": "© OpenStreetMap contributors"
|
||||
"text": "© Helsingborg municipality"
|
||||
},
|
||||
"name": "Hike & Bike"
|
||||
"description": "Orthophotos from the municipality of Helsingborg 2016, public domain",
|
||||
"name": "Helsingborg Orthophoto"
|
||||
},
|
||||
"kalmar-orto-2014": {
|
||||
"attribution": {
|
||||
"text": "© Kalmar municipality"
|
||||
},
|
||||
"description": "Orthophotos for the north coast of the municipality of Kalmar 2014",
|
||||
"name": "Kalmar North Orthophoto 2014"
|
||||
},
|
||||
"kalmar-orto-2016": {
|
||||
"attribution": {
|
||||
"text": "© Kalmar municipality"
|
||||
},
|
||||
"description": "Orthophotos for the south coast of the municipality of Kalmar 2016",
|
||||
"name": "Kalmar South Orthophoto 2016"
|
||||
},
|
||||
"kalmar-orto-2018": {
|
||||
"attribution": {
|
||||
"text": "© Kalmar municipality"
|
||||
},
|
||||
"description": "Orthophotos for urban areas of the municipality of Kalmar 2018",
|
||||
"name": "Kalmar Urban Orthophoto 2018"
|
||||
},
|
||||
"kelkkareitit": {
|
||||
"attribution": {
|
||||
@@ -7469,6 +7501,20 @@
|
||||
"description": "Mosaic of Swedish orthophotos from the period 1970–1980. Is under construction.",
|
||||
"name": "Lantmäteriet Historic Orthophoto 1975"
|
||||
},
|
||||
"lantmateriet-topowebb": {
|
||||
"attribution": {
|
||||
"text": "© Lantmäteriet, CC0"
|
||||
},
|
||||
"description": "Topographic map of Sweden 1:50 000",
|
||||
"name": "Lantmäteriet Topographic Map"
|
||||
},
|
||||
"linkoping-orto": {
|
||||
"attribution": {
|
||||
"text": "© Linköping municipality"
|
||||
},
|
||||
"description": "Orthophotos from the municipality of Linköping 2010, open data",
|
||||
"name": "Linköping Orthophoto"
|
||||
},
|
||||
"mapbox_locator_overlay": {
|
||||
"attribution": {
|
||||
"text": "Terms & Feedback"
|
||||
@@ -7533,6 +7579,13 @@
|
||||
},
|
||||
"name": "Stamen Terrain"
|
||||
},
|
||||
"stockholm-orto": {
|
||||
"attribution": {
|
||||
"text": "© Stockholm municipality, CC0"
|
||||
},
|
||||
"description": "Orthophotos from the municipality of Stockholm 2015, CC0 license",
|
||||
"name": "Stockholm Orthophoto"
|
||||
},
|
||||
"tf-cycle": {
|
||||
"attribution": {
|
||||
"text": "Maps © Thunderforest, Data © OpenStreetMap contributors"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import _find from 'lodash-es/find';
|
||||
import _intersection from 'lodash-es/intersection';
|
||||
|
||||
import {
|
||||
event as d3_event,
|
||||
@@ -75,8 +76,23 @@ export function modeDragNode(context) {
|
||||
}
|
||||
|
||||
|
||||
function connectAnnotation(entity) {
|
||||
return t('operations.connect.annotation.' + entity.geometry(context.graph()));
|
||||
function connectAnnotation(nodeEntity, targetEntity) {
|
||||
var nodeGeometry = nodeEntity.geometry(context.graph());
|
||||
var targetGeometry = targetEntity.geometry(context.graph());
|
||||
if (nodeGeometry === 'vertex' && targetGeometry === 'vertex') {
|
||||
var nodeParentWayIDs = context.graph().parentWays(nodeEntity);
|
||||
var targetParentWayIDs = context.graph().parentWays(targetEntity);
|
||||
var sharedParentWays = _intersection(nodeParentWayIDs, targetParentWayIDs);
|
||||
// if both vertices are part of the same way
|
||||
if (sharedParentWays.length !== 0) {
|
||||
// if the nodes are next to each other, they are merged
|
||||
if (sharedParentWays[0].areAdjacent(nodeEntity.id, targetEntity.id)) {
|
||||
return t('operations.connect.annotation.from_vertex.to_adjacent_vertex');
|
||||
}
|
||||
return t('operations.connect.annotation.from_vertex.to_sibling_vertex');
|
||||
}
|
||||
}
|
||||
return t('operations.connect.annotation.from_' + nodeGeometry + '.to_' + targetGeometry);
|
||||
}
|
||||
|
||||
|
||||
@@ -359,13 +375,13 @@ export function modeDragNode(context) {
|
||||
loc: choice.loc,
|
||||
edge: [target.nodes[choice.index - 1], target.nodes[choice.index]]
|
||||
}, entity),
|
||||
connectAnnotation(target)
|
||||
connectAnnotation(entity, target)
|
||||
);
|
||||
|
||||
} else if (target && target.type === 'node') {
|
||||
context.replace(
|
||||
actionConnect([target.id, entity.id]),
|
||||
connectAnnotation(target)
|
||||
connectAnnotation(entity, target)
|
||||
);
|
||||
|
||||
} else if (_wasMidpoint) {
|
||||
|
||||
@@ -106,7 +106,10 @@ export function uiRawTagEditor(context) {
|
||||
.attr('class', 'tag-row cf')
|
||||
.classed('readonly', isReadOnly);
|
||||
|
||||
enter
|
||||
var innerWrap = enter.append('div')
|
||||
.attr('class', 'inner-wrap');
|
||||
|
||||
innerWrap
|
||||
.append('div')
|
||||
.attr('class', 'key-wrap')
|
||||
.append('input')
|
||||
@@ -117,7 +120,7 @@ export function uiRawTagEditor(context) {
|
||||
.on('blur', keyChange)
|
||||
.on('change', keyChange);
|
||||
|
||||
enter
|
||||
innerWrap
|
||||
.append('div')
|
||||
.attr('class', 'input-wrap-position')
|
||||
.append('input')
|
||||
@@ -129,7 +132,7 @@ export function uiRawTagEditor(context) {
|
||||
.on('change', valueChange)
|
||||
.on('keydown.push-more', pushMore);
|
||||
|
||||
enter
|
||||
innerWrap
|
||||
.append('button')
|
||||
.attr('tabindex', -1)
|
||||
.attr('class', 'remove minor')
|
||||
@@ -169,9 +172,10 @@ export function uiRawTagEditor(context) {
|
||||
reference.showing(false);
|
||||
}
|
||||
|
||||
row
|
||||
.call(reference.button)
|
||||
.call(reference.body);
|
||||
row.select('.inner-wrap')
|
||||
.call(reference.button);
|
||||
|
||||
row.call(reference.body);
|
||||
});
|
||||
|
||||
items.selectAll('input.key')
|
||||
|
||||
@@ -206,7 +206,7 @@ describe('iD.serviceTaginfo', function() {
|
||||
);
|
||||
});
|
||||
|
||||
it('does not get values for extremely popular keys', function() {
|
||||
it('does not get values for extremely unpopular keys', function() {
|
||||
var callback = sinon.spy();
|
||||
taginfo.values({key: 'name', query: 'ste'}, callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user