Fossil SCM
Hide the tooltip if the mouse is outside the current timeline table, and outside the tooltip itself.
Commit
bd803b06267b1a77dd4aa8d3597482319d122ec3e3033cbc58c6419d8df39d1c
Parent
8b8eaad864c5521…
1 file changed
+9
+9
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -87,10 +87,19 @@ | ||
| 87 | 87 | topObj.ondblclick = dblclickOnGraph |
| 88 | 88 | topObj.onmousemove = function(e) { |
| 89 | 89 | var ix = findTxIndex(e); |
| 90 | 90 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| 91 | 91 | document.getElementsByTagName('body')[0].style.cursor = cursor; |
| 92 | + }; | |
| 93 | + topObj.onmouseleave = function(e) { | |
| 94 | + /* Hide the tooltip if the mouse is outside the "timelineTableN" element, | |
| 95 | + ** and outside the tooltip. */ | |
| 96 | + if (tooltipObj.style.display != "none" && | |
| 97 | + e.relatedTarget && | |
| 98 | + e.relatedTarget != tooltipObj) { | |
| 99 | + tooltipObj.style.display = "none"; | |
| 100 | + } | |
| 92 | 101 | }; |
| 93 | 102 | var canvasDiv; |
| 94 | 103 | var railPitch; |
| 95 | 104 | var mergeOffset; |
| 96 | 105 | var node, arrow, arrowSmall, line, mArrow, mLine, wArrow, wLine; |
| 97 | 106 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -87,10 +87,19 @@ | |
| 87 | topObj.ondblclick = dblclickOnGraph |
| 88 | topObj.onmousemove = function(e) { |
| 89 | var ix = findTxIndex(e); |
| 90 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| 91 | document.getElementsByTagName('body')[0].style.cursor = cursor; |
| 92 | }; |
| 93 | var canvasDiv; |
| 94 | var railPitch; |
| 95 | var mergeOffset; |
| 96 | var node, arrow, arrowSmall, line, mArrow, mLine, wArrow, wLine; |
| 97 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -87,10 +87,19 @@ | |
| 87 | topObj.ondblclick = dblclickOnGraph |
| 88 | topObj.onmousemove = function(e) { |
| 89 | var ix = findTxIndex(e); |
| 90 | var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */ |
| 91 | document.getElementsByTagName('body')[0].style.cursor = cursor; |
| 92 | }; |
| 93 | topObj.onmouseleave = function(e) { |
| 94 | /* Hide the tooltip if the mouse is outside the "timelineTableN" element, |
| 95 | ** and outside the tooltip. */ |
| 96 | if (tooltipObj.style.display != "none" && |
| 97 | e.relatedTarget && |
| 98 | e.relatedTarget != tooltipObj) { |
| 99 | tooltipObj.style.display = "none"; |
| 100 | } |
| 101 | }; |
| 102 | var canvasDiv; |
| 103 | var railPitch; |
| 104 | var mergeOffset; |
| 105 | var node, arrow, arrowSmall, line, mArrow, mLine, wArrow, wLine; |
| 106 |