mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Fix error when hovering way accuracy handles
This commit is contained in:
@@ -280,17 +280,21 @@ iD.Map = function() {
|
||||
}
|
||||
|
||||
function hoverIn() {
|
||||
var entity = d3.select(d3.event.target).datum();
|
||||
hover = entity.id;
|
||||
drawVector(iD.util.trueObj([hover]));
|
||||
d3.select('.messages').text(entity.tags.name || '#' + entity.id);
|
||||
var datum = d3.select(d3.event.target).datum();
|
||||
if (datum instanceof iD.Entity) {
|
||||
hover = datum.id;
|
||||
drawVector(iD.util.trueObj([hover]));
|
||||
d3.select('.messages').text(datum.tags.name || '#' + datum.id);
|
||||
}
|
||||
}
|
||||
|
||||
function hoverOut() {
|
||||
var oldHover = hover;
|
||||
hover = null;
|
||||
drawVector(iD.util.trueObj([oldHover]));
|
||||
d3.select('.messages').text('');
|
||||
if (hover) {
|
||||
var oldHover = hover;
|
||||
hover = null;
|
||||
drawVector(iD.util.trueObj([oldHover]));
|
||||
d3.select('.messages').text('');
|
||||
}
|
||||
}
|
||||
|
||||
function zoomPan() {
|
||||
|
||||
Reference in New Issue
Block a user