Fossil

Check-in [55f56e91]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to tooltip behavior in an effort to make it easier to move the mouse over to the "copy button" or to the hyperlink without the tooltip changing out from under the user.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 55f56e91badb50ce8a2b874e7f43fbb57f7706d84be0a992e35209377fc37ba5
User & Date: drh 2019-06-08 14:48:55
References
2019-06-10
16:02
This check-in started as a follow-up to [55f56e91ba] to make the tooltip less hasty, and prevent it from being instantly reshown (and slightly moved) when the mouse pointer goes back from the tooltip to the owning node. The final result is a combined and simplified "mousemove" handler for both nodes and rails, with consistent tooltip lifetime: the tooltip is only closed if the mouse pointer is at a fixed point over another element for the (full) duration of the dwell timeout, or away from the owning element (and the tooltip) for the (full) duration of the close timeout. This check-in also improves positioning of the tooltip for longer dwell timeouts. check-in: 1fc61638 user: florian tags: tooltip-tweaks
Context
2019-06-10
16:02
This check-in started as a follow-up to [55f56e91ba] to make the tooltip less hasty, and prevent it from being instantly reshown (and slightly moved) when the mouse pointer goes back from the tooltip to the owning node. The final result is a combined and simplified "mousemove" handler for both nodes and rails, with consistent tooltip lifetime: the tooltip is only closed if the mouse pointer is at a fixed point over another element for the (full) duration of the dwell timeout, or away from the owning element (and the tooltip) for the (full) duration of the close timeout. This check-in also improves positioning of the tooltip for longer dwell timeouts. check-in: 1fc61638 user: florian tags: tooltip-tweaks
2019-06-08
16:11
Fix to the graph layout for complex time-warp cases. Add tooltips to timewarp arrows. check-in: 5399c5da user: drh tags: trunk
14:48
Improvements to tooltip behavior in an effort to make it easier to move the mouse over to the "copy button" or to the hyperlink without the tooltip changing out from under the user. check-in: 55f56e91 user: drh tags: trunk
14:19
Minor name refactoring and comment enhancements in graph.js. No logic changes. Improvements to the javascript compressor. Apply compression to "*/js.txt" files in addition to "*.js" files. check-in: 786d6167 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/graph.js.

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
..
87
88
89
90
91
92
93
94









95
96
97
98
99
100
101
**        and a thin merge-arrow descender is drawn to the bottom of
**        the screen. This array is omitted if there are no inbound
**        merges.
**   ci:  "cherrypick-in". Like "mi" except for cherrypick merges.
**        omitted if there are no cherrypick merges.
**    h:  The artifact hash of the object being graphed
*/

/* The amendCss() function does a one-time change to the CSS to account
** for the "circleNodes" and "showArrowheads" settings.  Do this change
** only once, even if there are multiple graphs being rendered.
*/
var amendCssOnce = 1; // Only change the CSS one time
function amendCss(circleNodes,showArrowheads){
  if( !amendCssOnce ) return;
................................................................................
}

/* The <span> object that holds the tooltip */
var tooltipObj = document.createElement("span");
tooltipObj.className = "tl-tooltip";
tooltipObj.style.display = "none";
document.getElementsByClassName("content")[0].appendChild(tooltipObj);
tooltipObj.onmouseenter = function(){stopCloseTimer();}









tooltipObj.onmouseleave = function(){
  if (tooltipInfo.ixActive != -1) resumeCloseTimer();
};

/* State information for the tooltip popup and its timers */
window.tooltipInfo = {
  dwellTimeout: 250,  /* The tooltip dwell timeout. */







<







 







|
>
>
>
>
>
>
>
>
>







59
60
61
62
63
64
65

66
67
68
69
70
71
72
..
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
**        and a thin merge-arrow descender is drawn to the bottom of
**        the screen. This array is omitted if there are no inbound
**        merges.
**   ci:  "cherrypick-in". Like "mi" except for cherrypick merges.
**        omitted if there are no cherrypick merges.
**    h:  The artifact hash of the object being graphed
*/

/* The amendCss() function does a one-time change to the CSS to account
** for the "circleNodes" and "showArrowheads" settings.  Do this change
** only once, even if there are multiple graphs being rendered.
*/
var amendCssOnce = 1; // Only change the CSS one time
function amendCss(circleNodes,showArrowheads){
  if( !amendCssOnce ) return;
................................................................................
}

/* The <span> object that holds the tooltip */
var tooltipObj = document.createElement("span");
tooltipObj.className = "tl-tooltip";
tooltipObj.style.display = "none";
document.getElementsByClassName("content")[0].appendChild(tooltipObj);
tooltipObj.onmouseenter = function(){
  /* Hold the tooltip constant as long as the mouse is over the tooltip.
  ** In other words, do not let any of the timers changes the tooltip while
  ** the mouse is directly over the tooltip.  This makes it easier for the
  ** user to move over top of the "copy-button" or the hyperlink to the
  ** /info page. */
  stopCloseTimer();
  stopDwellTimer();
  tooltipInfo.ixHover = tooltipInfo.ixActive;
}
tooltipObj.onmouseleave = function(){
  if (tooltipInfo.ixActive != -1) resumeCloseTimer();
};

/* State information for the tooltip popup and its timers */
window.tooltipInfo = {
  dwellTimeout: 250,  /* The tooltip dwell timeout. */