mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-04 18:33:38 +00:00
Merge pull request #2089 from mourner/better-hover
Better hover experience
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user