Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add a non-linked "type" name in front of all tooltips. Style the foreground color and border color based on the default font color. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | tooltip-experiments |
| Files: | files | file ages | folders |
| SHA3-256: |
2bfa69a3013dde35432933a0ba863eae |
| User & Date: | drh 2019-05-22 23:24:15.253 |
Context
|
2019-05-23
| ||
| 01:55 | Add a box-shadow to the default CSS for tooltips. ... (check-in: 22082e3ff2 user: drh tags: tooltip-experiments) | |
|
2019-05-22
| ||
| 23:24 | Add a non-linked "type" name in front of all tooltips. Style the foreground color and border color based on the default font color. ... (check-in: 2bfa69a301 user: drh tags: tooltip-experiments) | |
| 18:09 | Show tooltips in the color scheme of the object that the tooltip refers to. ... (check-in: cf1f42435a user: drh tags: tooltip-experiments) | |
Changes
Changes to src/graph.js.
| ︙ | ︙ | |||
592 593 594 595 596 597 598 |
var html = null
var ix = -1
if( tooltipInfo.ixHover==-2 ){
ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow
var h = tx.rowinfo[ix].h
var dest = tx.baseUrl + "/info/" + h
if( tx.fileDiff ){
| | | | > | < | | | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
var html = null
var ix = -1
if( tooltipInfo.ixHover==-2 ){
ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow
var h = tx.rowinfo[ix].h
var dest = tx.baseUrl + "/info/" + h
if( tx.fileDiff ){
html = "artifact <a href=\""+dest+"\">"+h+"</a>"
}else{
html = "check-in <a href=\""+dest+"\">"+h+"</a>"
}
}else if( tooltipInfo.ixHover>=0 ){
ix = tooltipInfo.ixHover
var br = tx.rowinfo[ix].br
var dest = branchHyperlink(ix)
var hbr = br.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
html = "branch <a href=\""+dest+"\">"+hbr+"</a>"
tooltipInfo.ixActive = ix;
}
if( html ){
/* Setup while hidden, to ensure proper dimensions. */
var s = getComputedStyle(document.body)
if( tx.rowinfo[ix].bg.length ){
tooltipObj.style.backgroundColor = tx.rowinfo[ix].bg
}else{
tooltipObj.style.backgroundColor = s.getPropertyValue('background-color')
}
tooltipObj.style.borderColor =
tooltipObj.style.color = s.getPropertyValue('color')
tooltipObj.style.visibility = "hidden"
tooltipObj.innerHTML = html
tooltipObj.style.display = "inline"
tooltipObj.style.position = "absolute"
var x = tooltipInfo.posX + 4 + window.pageXOffset
tooltipObj.style.left = x+"px"
var y = tooltipInfo.posY + window.pageYOffset
|
| ︙ | ︙ |