mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
Clean up inspector setup
This commit is contained in:
+2
-1
@@ -107,7 +107,8 @@ var iD = function(container) {
|
||||
.on('click', function(d) { return d[2](); });
|
||||
|
||||
this.append('div')
|
||||
.attr('class', 'inspector-wrap').style('display', 'none');
|
||||
.attr('class', 'inspector-wrap')
|
||||
.style('display', 'none');
|
||||
|
||||
this.append('div')
|
||||
.attr('id', 'about')
|
||||
|
||||
@@ -129,9 +129,6 @@ iD.Map = function() {
|
||||
arrow.remove();
|
||||
|
||||
map.size(this.size());
|
||||
|
||||
hideInspector();
|
||||
|
||||
map.surface = surface;
|
||||
}
|
||||
|
||||
@@ -442,7 +439,8 @@ iD.Map = function() {
|
||||
selection = entity.id;
|
||||
d3.select('.inspector-wrap')
|
||||
.style('display', 'block')
|
||||
.datum(map.history.graph().fetch(entity.id)).call(inspector);
|
||||
.datum(map.history.graph().fetch(entity.id))
|
||||
.call(inspector);
|
||||
redraw();
|
||||
}
|
||||
|
||||
@@ -451,11 +449,7 @@ iD.Map = function() {
|
||||
if (entity) entity = entity[0];
|
||||
if (!entity || selection === entity.id || (entity.tags && entity.tags.elastic)) return;
|
||||
if (entity.type === 'way') d3.select(d3.event.target).call(waydragbehavior);
|
||||
selection = entity.id;
|
||||
d3.select('.inspector-wrap')
|
||||
.style('display', 'block')
|
||||
.datum(map.history.graph().fetch(entity.id)).call(inspector);
|
||||
redraw();
|
||||
selectEntity(entity);
|
||||
}
|
||||
|
||||
function removeEntity(entity) {
|
||||
|
||||
@@ -141,6 +141,5 @@ iD.Inspector = function() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return d3.rebind(inspector, event, 'on');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user