mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-29 19:29:35 +02:00
Merge branch 'master' of github.com:systemed/iD
This commit is contained in:
+16
-1
@@ -1586,4 +1586,19 @@ div.combobox {
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 840px) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Address input */
|
||||
|
||||
.preset-input .addr-housename {
|
||||
width: 300px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preset-input .addr-number {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.preset-input .addr-streetname {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
<script src='js/id/ui/taglist.js'></script>
|
||||
<script src='js/id/ui/presetgrid.js'></script>
|
||||
<script src='js/id/ui/tageditor.js'></script>
|
||||
<script src='js/id/ui/address.js'></script>
|
||||
|
||||
<script src='js/id/actions.js'></script>
|
||||
<script src="js/id/actions/add_midpoint.js"></script>
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ iD.Tree = function(graph) {
|
||||
function extentRectangle(extent) {
|
||||
x = m * extent[0][0],
|
||||
y = m * extent[0][1],
|
||||
dx = m * extent[1][0] - x || 1,
|
||||
dy = m * extent[1][1] - y || 1;
|
||||
dx = m * extent[1][0] - x || 2,
|
||||
dy = m * extent[1][1] - y || 2;
|
||||
return new RTree.Rectangle(~~x, ~~y, ~~dx - 1, ~~dy - 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,3 +85,7 @@ iD.geo.pathLength = function(path) {
|
||||
}
|
||||
return length;
|
||||
};
|
||||
|
||||
iD.geo.metresToCoordinates = function(loc, vector) {
|
||||
return [vector[1] / 111200, vector[0] / 111200 / Math.cos(loc[1])];
|
||||
};
|
||||
|
||||
@@ -16,14 +16,13 @@ iD.ui.Inspector = function() {
|
||||
|
||||
entity = selection.datum();
|
||||
|
||||
var iwrap = selection
|
||||
messagewrap = iwrap.append('div')
|
||||
var messagewrap = selection.append('div')
|
||||
.attr('class', 'message inspector-inner fillL'),
|
||||
message = messagewrap.append('h3');
|
||||
|
||||
inspectorbody = iwrap.append('div')
|
||||
inspectorbody = selection.append('div')
|
||||
.attr('class', 'fillL'),
|
||||
iwrap.append('div')
|
||||
selection.append('div')
|
||||
.attr('class', 'inspector-actions pad1 col12')
|
||||
.call(drawButtons);
|
||||
|
||||
@@ -57,7 +56,7 @@ iD.ui.Inspector = function() {
|
||||
inspectorbody.call(tagEditor);
|
||||
}
|
||||
|
||||
iwrap.call(iD.ui.Toggle(true));
|
||||
selection.call(iD.ui.Toggle(true));
|
||||
}
|
||||
|
||||
function drawButtons(selection) {
|
||||
|
||||
@@ -134,6 +134,11 @@ iD.ui.preset = function() {
|
||||
// Multiple elements, eg, address
|
||||
} else {
|
||||
if (d.type === 'address') {
|
||||
wrap.append('div')
|
||||
.attr('class', 'col8 preset-input', d)
|
||||
.call(iD.ui.preset.address()
|
||||
.context(context)
|
||||
.entity(entity));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -226,6 +226,8 @@ d3.combobox = function() {
|
||||
}
|
||||
|
||||
function mousedown() {
|
||||
|
||||
input.node().focus();
|
||||
update('');
|
||||
|
||||
var entries = container.selectAll('a'),
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
{
|
||||
"key": "cuisine",
|
||||
"type": "combo"
|
||||
},
|
||||
{
|
||||
"type": "address",
|
||||
"title": "Address"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -52,5 +52,13 @@ describe("iD.Tree", function() {
|
||||
var g = tree.graph().replace(n1).replace(n2);
|
||||
expect(tree.intersects(iD.geo.Extent([0, 0], [1.1, 1.1]), g)).to.eql([n1]);
|
||||
});
|
||||
|
||||
it("doesn't include removed entities", function() {
|
||||
var n1 = iD.Node({ id: 'n1', loc: [1, 1]});
|
||||
var g = tree.graph().replace(n1);
|
||||
expect(tree.intersects(iD.geo.Extent([0, 0], [2, 2]), g)).to.eql([n1]);
|
||||
g = g.remove(n1);
|
||||
expect(tree.intersects(iD.geo.Extent([0, 0], [2, 2]), g)).to.eql([]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user