Fossil

Check-in [19ba7390e2]
Login

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

Overview
Comment:The tooltip pop-up contains a hyperlink to the branch
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | tooltips
Files: files | file ages | folders
SHA3-256: 19ba7390e2ea63ab7bf69b163dec141e909a54fb2df266b61156594af78df896
User & Date: drh 2019-05-18 14:00:24.545
Context
2019-05-18
14:39
Improvements to the default tooltip CSS so that it is readable on skins with dark backgrounds and light text. ... (check-in: d6b83f54dd user: drh tags: tooltips)
14:00
The tooltip pop-up contains a hyperlink to the branch ... (check-in: 19ba7390e2 user: drh tags: tooltips)
02:07
Single-click to get the tooltip. Double-click to hyperlink to the branch graph. Click is approximate and does not require a direct hit on the graph line. ... (check-in: 9dc7454651 user: drh tags: tooltips)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
410
411
412
413
414
415
416

417
418
419
420
421
422
423
    for( var i=0; i<tx.nrail; i++) mergeBtm[i] = btm;
    for( var i=tx.rowinfo.length-1; i>=0; i-- ){
      drawNode(tx.rowinfo[i], btm);
    }
  }
  var selRow;
  function clickOnNode(e){

    var p = tx.rowinfo[parseInt(this.id.match(/\d+$/)[0], 10)-tx.iTopRow];
    if( !selRow ){
      selRow = p;
      this.className += " sel";
      canvasDiv.className += " sel";
    }else if( selRow==p ){
      selRow = null;







>







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    for( var i=0; i<tx.nrail; i++) mergeBtm[i] = btm;
    for( var i=tx.rowinfo.length-1; i>=0; i-- ){
      drawNode(tx.rowinfo[i], btm);
    }
  }
  var selRow;
  function clickOnNode(e){
    tooltipObj.style.display = "none"
    var p = tx.rowinfo[parseInt(this.id.match(/\d+$/)[0], 10)-tx.iTopRow];
    if( !selRow ){
      selRow = p;
      this.className += " sel";
      canvasDiv.className += " sel";
    }else if( selRow==p ){
      selRow = null;
458
459
460
461
462
463
464
465








466
467
468
469
470
471
472
    return -1
  }
  function clickOnGraph(e){
    var ix = findTxIndex(e);
    if( ix<0 ){
      tooltipObj.style.display = "none"
    }else{  
      tooltipObj.textContent = tx.rowinfo[ix].br








      tooltipObj.style.display = "inline"
      tooltipObj.style.position = "absolute"
      var x = e.x + 4 + window.pageXOffset
      tooltipObj.style.left = x+"px"
      var y = e.y + window.pageYOffset - tooltipObj.clientHeight - 4
      tooltipObj.style.top = y+"px"
      tooltipObj.style.visibility = "visible"







|
>
>
>
>
>
>
>
>







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
    return -1
  }
  function clickOnGraph(e){
    var ix = findTxIndex(e);
    if( ix<0 ){
      tooltipObj.style.display = "none"
    }else{  
      var br = tx.rowinfo[ix].br
      var dest = tx.baseUrl + "/timeline?r=" + encodeURIComponent(br)
      dest += "&c=" + encodeURIComponent(tx.rowinfo[ix].h)
      var hbr = br.replace(/&/g, "&amp;")
         .replace(/</g, "&lt;")
         .replace(/>/g, "&gt;")
         .replace(/"/g, "&quot;")
         .replace(/'/g, "&#039;");
      tooltipObj.innerHTML = "<a href=\""+dest+"\">"+hbr+"</a>"
      tooltipObj.style.display = "inline"
      tooltipObj.style.position = "absolute"
      var x = e.x + 4 + window.pageXOffset
      tooltipObj.style.left = x+"px"
      var y = e.y + window.pageYOffset - tooltipObj.clientHeight - 4
      tooltipObj.style.top = y+"px"
      tooltipObj.style.visibility = "visible"