Fossil

Check-in [49bee969]
Login

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

Overview
Comment:Fix the test whether the currently hovered element is the owner of the tooltip.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tooltip-tweaks
Files: files | file ages | folders
SHA3-256: 49bee969ee0f636b30a73d347d66ac1cac726c4ff0c8021f573b02704d9263e0
User & Date: florian 2019-06-11 06:59:00
Context
2019-06-12
09:41
Improvements to tooltip handling. check-in: 3a8abf49 user: drh tags: trunk
2019-06-11
06:59
Fix the test whether the currently hovered element is the owner of the tooltip. Leaf check-in: 49bee969 user: florian tags: tooltip-tweaks
2019-06-10
16:08
Fix a minor coding typo from [2196555351] (property name). check-in: af2ca388 user: florian tags: tooltip-tweaks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/graph.js.

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
    e.stopPropagation()
    mouseOverGraph(e,-2,this)
  }
  /* Combined mousemove handler for graph nodes and rails. */
  function mouseOverGraph(e,ix,node){
    stopDwellTimer();                 // Mouse movement: reset the dwell timer.
    var ownTooltip =   // Check if the hovered element already has the tooltip.
      (ix!=-2 && ix==tooltipInfo.ixHover && ix==tooltipInfo.ixActive) ||
      (ix==-2 && tooltipInfo.ixHover==-2 && tooltipInfo.idNodeActive==node.id);
    if(ownTooltip) stopCloseTimer();  // ownTooltip: clear the close timer.
    else resumeCloseTimer();          // !ownTooltip: resume the close timer.
    tooltipInfo.ixHover = ix;
    tooltipInfo.nodeHover = node;
    tooltipInfo.posX = e.clientX;
    tooltipInfo.posY = e.clientY;
    if(ix!=-1 && !ownTooltip && tooltipInfo.dwellTimeout>0){  // Go dwell timer.







|
|







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
    e.stopPropagation()
    mouseOverGraph(e,-2,this)
  }
  /* Combined mousemove handler for graph nodes and rails. */
  function mouseOverGraph(e,ix,node){
    stopDwellTimer();                 // Mouse movement: reset the dwell timer.
    var ownTooltip =   // Check if the hovered element already has the tooltip.
      (ix>=0 && ix==tooltipInfo.ixActive) ||
      (ix==-2 && tooltipInfo.idNodeActive==node.id);
    if(ownTooltip) stopCloseTimer();  // ownTooltip: clear the close timer.
    else resumeCloseTimer();          // !ownTooltip: resume the close timer.
    tooltipInfo.ixHover = ix;
    tooltipInfo.nodeHover = node;
    tooltipInfo.posX = e.clientX;
    tooltipInfo.posY = e.clientY;
    if(ix!=-1 && !ownTooltip && tooltipInfo.dwellTimeout>0){  // Go dwell timer.