mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 15:34:49 +02:00
Fix tail flipping
This commit is contained in:
+7
-4
@@ -31,11 +31,14 @@ d3.tail = function() {
|
||||
|
||||
}
|
||||
|
||||
function show() {
|
||||
container.style('display', 'block');
|
||||
tooltip_size = container.size();
|
||||
}
|
||||
|
||||
function mousemove() {
|
||||
if (text === false) return;
|
||||
if (container.style('display') == 'none') {
|
||||
container.style('display', 'block');
|
||||
}
|
||||
if (container.style('display') === 'none') show();
|
||||
var xoffset = ((d3.event.clientX + tooltip_size[0] + xmargin) > selection_size[0]) ?
|
||||
-tooltip_size[0] - xmargin : xmargin;
|
||||
container.classed('left', xoffset > 0);
|
||||
@@ -51,7 +54,7 @@ d3.tail = function() {
|
||||
|
||||
function mouseover() {
|
||||
if (d3.event.relatedTarget !== container.node() &&
|
||||
text !== false) container.style('display', 'block');
|
||||
text !== false) show();
|
||||
}
|
||||
|
||||
if (!container) setup();
|
||||
|
||||
Reference in New Issue
Block a user