diff --git a/js/id/behavior/tail.js b/js/id/behavior/tail.js index 642aeb791..6288948a3 100644 --- a/js/id/behavior/tail.js +++ b/js/id/behavior/tail.js @@ -24,13 +24,13 @@ iD.behavior.Tail = function() { iD.util.setTransform(container, d3.event.clientX + xoffset, d3.event.clientY); } - function mouseout() { + function mouseleave() { if (d3.event.relatedTarget !== container.node()) { container.style('display', 'none'); } } - function mouseover() { + function mouseenter() { if (d3.event.relatedTarget !== container.node()) { show(); } @@ -46,8 +46,8 @@ iD.behavior.Tail = function() { selection .on('mousemove.tail', mousemove) - .on('mouseover.tail', mouseover) - .on('mouseout.tail', mouseout); + .on('mouseenter.tail', mouseenter) + .on('mouseleave.tail', mouseleave); container .on('mousemove.tail', mousemove); @@ -65,8 +65,8 @@ iD.behavior.Tail = function() { selection .on('mousemove.tail', null) - .on('mouseover.tail', null) - .on('mouseout.tail', null); + .on('mouseenter.tail', null) + .on('mouseleave.tail', null); d3.select(window) .on('resize.tail', null); diff --git a/js/id/ui/sidebar.js b/js/id/ui/sidebar.js index b3c7294d1..08c46dbc0 100644 --- a/js/id/ui/sidebar.js +++ b/js/id/ui/sidebar.js @@ -32,6 +32,8 @@ iD.ui.Sidebar = function(context) { } }; + sidebar.hover = _.throttle(sidebar.hover, 200); + sidebar.select = function(id, newFeature) { if (!current && id) { featureListWrap.classed('inspector-hidden', true);