mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-26 07:23:40 +00:00
avoid excessive tooltip show/hide with mouseenter/leave
This commit is contained in:
@@ -27,13 +27,13 @@ iD.behavior.Tail = function() {
|
||||
~~d3.event.clientY + 'px)');
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
@@ -49,8 +49,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);
|
||||
@@ -68,8 +68,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);
|
||||
|
||||
Reference in New Issue
Block a user