Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Explicitly query the client mouse coordinates, to fix the positioning of tooltips for nodes in IE. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | tooltip-experiments |
| Files: | files | file ages | folders |
| SHA3-256: |
ac199e7a8aece7e778011ecb3a3021e4 |
| User & Date: | florian 2019-05-28 12:16:00.000 |
References
|
2019-05-28
| ||
| 12:32 | Cherry-pick [ac199e7a8a]: Explicitly query the client mouse coordinates, to fix the positioning of tooltips for nodes in IE. ... (check-in: 3b5e74c4ca user: florian tags: tooltip-copyhash) | |
Context
|
2019-05-28
| ||
| 12:32 | Cherry-pick [ac199e7a8a]: Explicitly query the client mouse coordinates, to fix the positioning of tooltips for nodes in IE. ... (check-in: 3b5e74c4ca user: florian tags: tooltip-copyhash) | |
| 12:16 | Explicitly query the client mouse coordinates, to fix the positioning of tooltips for nodes in IE. ... (Closed-Leaf check-in: ac199e7a8a user: florian tags: tooltip-experiments) | |
|
2019-05-27
| ||
| 06:58 | Ensure the close timer is started for tooltips belonging to nodes instead of rails, and prevent an out-of-bounds array access for double-clicks outside of rails. ... (check-in: d57c1a797c user: florian tags: tooltip-experiments) | |
Changes
Changes to src/graph.js.
| ︙ | ︙ | |||
155 156 157 158 159 160 161 |
}
/* The tooltip is either not visible, or the mouse is over a different
** element, so clear the dwell timer, and record the new element id and
** mouse position. */
stopDwellTimer();
if(ix >= 0){
tooltipInfo.ixHover = ix;
| | | | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
}
/* The tooltip is either not visible, or the mouse is over a different
** element, so clear the dwell timer, and record the new element id and
** mouse position. */
stopDwellTimer();
if(ix >= 0){
tooltipInfo.ixHover = ix;
tooltipInfo.posX = e.clientX;
tooltipInfo.posY = e.clientY;
stopCloseTimer();
if(tooltipInfo.dwellTimeout>0){
tooltipInfo.idTimer = setTimeout(function() {
tooltipInfo.idTimer = 0;
stopCloseTimer();
showGraphTooltip();
},tooltipInfo.dwellTimeout);
|
| ︙ | ︙ | |||
186 187 188 189 190 191 192 |
}
};
function nodeHover(e){
/* Invoked by mousemove events over a graph node */
e.stopPropagation()
if(tooltipInfo.ixHover==-2) return
tooltipInfo.ixHover = -2
| | | | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
}
};
function nodeHover(e){
/* Invoked by mousemove events over a graph node */
e.stopPropagation()
if(tooltipInfo.ixHover==-2) return
tooltipInfo.ixHover = -2
tooltipInfo.posX = e.clientX
tooltipInfo.posY = e.clientY
tooltipInfo.nodeHover = this
stopCloseTimer();
if(tooltipInfo.dwellTimeout>0){
tooltipInfo.idTimer = setTimeout(function() {
tooltipInfo.idTimer = 0;
stopCloseTimer();
showGraphTooltip();
|
| ︙ | ︙ | |||
555 556 557 558 559 560 561 |
window.location.href = tx.baseUrl+"/info/"+p.h
e.stopPropagation()
}
function findTxIndex(e){
/* Look at all the graph elements. If any graph elements that is near
** the click-point "e" and has a "data-ix" attribute, then return
** the value of that attribute. Otherwise return -1 */
| | | | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
window.location.href = tx.baseUrl+"/info/"+p.h
e.stopPropagation()
}
function findTxIndex(e){
/* Look at all the graph elements. If any graph elements that is near
** the click-point "e" and has a "data-ix" attribute, then return
** the value of that attribute. Otherwise return -1 */
var x = e.clientX + window.pageXOffset - absoluteX(canvasDiv);
var y = e.clientY + window.pageYOffset - absoluteY(canvasDiv);
var aNode = canvasDiv.childNodes
var nNode = aNode.length;
var i;
for(i=0;i<nNode;i++){
var n = aNode[i]
if( !n.hasAttribute("data-ix") ) continue;
if( x<n.offsetLeft-5 ) continue;
|
| ︙ | ︙ | |||
581 582 583 584 585 586 587 |
var dest = tx.baseUrl + "/timeline?r=" + encodeURIComponent(br)
dest += tx.fileDiff ? "&m&cf=" : "&m&c="
dest += encodeURIComponent(tx.rowinfo[ix].h)
return dest
}
function clickOnGraph(e){
tooltipInfo.ixHover = findTxIndex(e);
| | | | 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
var dest = tx.baseUrl + "/timeline?r=" + encodeURIComponent(br)
dest += tx.fileDiff ? "&m&cf=" : "&m&c="
dest += encodeURIComponent(tx.rowinfo[ix].h)
return dest
}
function clickOnGraph(e){
tooltipInfo.ixHover = findTxIndex(e);
tooltipInfo.posX = e.clientX;
tooltipInfo.posY = e.clientY;
showGraphTooltip();
}
function showGraphTooltip(){
var html = null
var ix = -1
if( tooltipInfo.ixHover==-2 ){
ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow
|
| ︙ | ︙ |