Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Also add a configuration option to set the closeTimeout for tooltips. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | tooltip-experiments |
| Files: | files | file ages | folders |
| SHA3-256: |
e45429d7f47d86ace5aca9f92f7dfc6d |
| User & Date: | florian 2019-05-21 09:12:00.000 |
Context
|
2019-05-21
| ||
| 09:40 | Fix a bug introduced with [e0198213f3]: using "style.visibility" is essential to calculate the dimensions in the hidden state. ... (check-in: 3850b32cea user: florian tags: tooltip-experiments) | |
| 09:12 | Also add a configuration option to set the closeTimeout for tooltips. ... (check-in: e45429d7f4 user: florian tags: tooltip-experiments) | |
| 08:27 | Resolve the fork. ... (check-in: fde231b274 user: florian tags: tooltip-experiments) | |
Changes
Changes to src/configure.c.
| ︙ | ︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
{ "logo-mimetype", CONFIGSET_SKIN },
{ "logo-image", CONFIGSET_SKIN },
{ "background-mimetype", CONFIGSET_SKIN },
{ "background-image", CONFIGSET_SKIN },
{ "timeline-block-markup", CONFIGSET_SKIN },
{ "timeline-date-format", CONFIGSET_SKIN },
{ "timeline-dwelltime", CONFIGSET_SKIN },
{ "timeline-max-comment", CONFIGSET_SKIN },
{ "timeline-plaintext", CONFIGSET_SKIN },
{ "timeline-truncate-at-blank", CONFIGSET_SKIN },
{ "timeline-utc", CONFIGSET_SKIN },
{ "adunit", CONFIGSET_SKIN },
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
{ "adunit-omit-if-user", CONFIGSET_SKIN },
| > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
{ "logo-mimetype", CONFIGSET_SKIN },
{ "logo-image", CONFIGSET_SKIN },
{ "background-mimetype", CONFIGSET_SKIN },
{ "background-image", CONFIGSET_SKIN },
{ "timeline-block-markup", CONFIGSET_SKIN },
{ "timeline-date-format", CONFIGSET_SKIN },
{ "timeline-dwelltime", CONFIGSET_SKIN },
{ "timeline-closetime", CONFIGSET_SKIN },
{ "timeline-max-comment", CONFIGSET_SKIN },
{ "timeline-plaintext", CONFIGSET_SKIN },
{ "timeline-truncate-at-blank", CONFIGSET_SKIN },
{ "timeline-utc", CONFIGSET_SKIN },
{ "adunit", CONFIGSET_SKIN },
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
{ "adunit-omit-if-user", CONFIGSET_SKIN },
|
| ︙ | ︙ |
Changes to src/graph.js.
| ︙ | ︙ | |||
12 13 14 15 16 17 18 | ** "nomo": BOOLEAN, // True to join merge lines with rails ** "iTopRow": INTEGER, // Index of top-most row in the graph ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen ** "fileDiff": BOOLEAN, // True for file diff. False for check-in ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render ** "nrail": INTEGER, // Number of vertical "rails" ** "baseUrl": TEXT, // Top-level URL | | > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ** "nomo": BOOLEAN, // True to join merge lines with rails ** "iTopRow": INTEGER, // Index of top-most row in the graph ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen ** "fileDiff": BOOLEAN, // True for file diff. False for check-in ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render ** "nrail": INTEGER, // Number of vertical "rails" ** "baseUrl": TEXT, // Top-level URL ** "dwellTimeout": INTEGER, // Tooltip show delay in milliseconds ** "closeTimeout": INTEGER, // Tooltip close delay in milliseconds ** "rowinfo": ROWINFO-ARRAY } ** ** The rowinfo field is an array of structures, one per entry in the timeline, ** where each structure has the following fields: ** ** id: The id of the <div> element for the row. This is an integer. ** to get an actual id, prepend "m" to the integer. The top node |
| ︙ | ︙ | |||
110 111 112 113 114 115 116 |
if (this.tooltipInfo.idTimer != 0) {
clearTimeout(this.tooltipInfo.idTimer);
this.tooltipInfo.idTimer = 0;
}
}.bind(window);
var resumeCloseTimer = function() {
/* This timer must be stopped explicitly to reset the elapsed timeout. */
| | > > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
if (this.tooltipInfo.idTimer != 0) {
clearTimeout(this.tooltipInfo.idTimer);
this.tooltipInfo.idTimer = 0;
}
}.bind(window);
var resumeCloseTimer = function() {
/* This timer must be stopped explicitly to reset the elapsed timeout. */
if (this.tooltipInfo.idTimerClose == 0 &&
this.tooltipInfo.closeTimeout>0) {
this.tooltipInfo.idTimerClose = setTimeout(function() {
this.tooltipInfo.idTimerClose = 0;
hideGraphTooltip();
}.bind(window),this.tooltipInfo.closeTimeout);
}
}.bind(window);
var stopCloseTimer = function() {
if (this.tooltipInfo.idTimerClose != 0) {
clearTimeout(this.tooltipInfo.idTimerClose);
this.tooltipInfo.idTimerClose = 0;
}
}.bind(window);
/* Construct that graph corresponding to the timeline-data-N object */
function TimelineGraph(tx){
var topObj = document.getElementById("timelineTable"+tx.iTableId);
amendCss(tx.circleNodes, tx.showArrowheads);
tooltipInfo.dwellTimeout = tx.dwellTimeout
tooltipInfo.closeTimeout = tx.closeTimeout
topObj.onclick = clickOnGraph
topObj.ondblclick = dblclickOnGraph
topObj.onmousemove = function(e) {
var ix = findTxIndex(e);
var cursor = (ix<0) ? "" : "pointer"; /* Or: cursor = "help"? */
document.getElementsByTagName('body')[0].style.cursor = cursor;
/* Keep the already visible tooltip at a constant position, as long as the
|
| ︙ | ︙ |
Changes to src/setup.c.
| ︙ | ︙ | |||
748 749 750 751 752 753 754 |
entry_attribute("Max timeline comment length", 6,
"timeline-max-comment", "tmc", "0", 0);
@ <p>The maximum length of a comment to be displayed in a timeline.
@ "0" there is no length limit.
@ (Property: "timeline-max-comment")</p>
@ <hr />
| | > > > | | > > > | > > | | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 |
entry_attribute("Max timeline comment length", 6,
"timeline-max-comment", "tmc", "0", 0);
@ <p>The maximum length of a comment to be displayed in a timeline.
@ "0" there is no length limit.
@ (Property: "timeline-max-comment")</p>
@ <hr />
entry_attribute("Tooltip dwell time (milliseconds)", 6,
"timeline-dwelltime", "tdt", "250", 0);
@ <br>
entry_attribute("Tooltip close time (milliseconds)", 6,
"timeline-closetime", "tct", "3000", 0);
@ <p>The <strong>dwell time</strong> defines how long the mouse pointer
@ should be stationary above an object of the graph before a tooltip
@ appears.<br>
@ The <strong>close time</strong> defines how long the mouse pointer
@ can be away from an object before a tooltip is closed.</p>
@ <p>Set <strong>dwell time</strong> to "0" to disable tooltips.<br>
@ Set <strong>close time</strong> to "0" to keep tooltips visible until
@ the mouse is clicked elsewhere.<p>
@ <p>(Properties: "timeline-dwelltime", "timeline-closetime")</p>
@ <hr />
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ </div></form>
db_end_transaction(0);
style_footer();
}
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
828 829 830 831 832 833 834 |
int showArrowheads; /* True to draw arrowheads. False to omit. */
int circleNodes; /* True for circle nodes. False for square nodes */
int colorGraph; /* Use colors for graph lines */
int iTopRow; /* Index of the top row of the graph */
int fileDiff; /* True for file diff. False for check-in diff */
int omitDescenders; /* True to omit descenders */
int scrollToSelect; /* True to scroll to the selection */
| | > > > | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
int showArrowheads; /* True to draw arrowheads. False to omit. */
int circleNodes; /* True for circle nodes. False for square nodes */
int colorGraph; /* Use colors for graph lines */
int iTopRow; /* Index of the top row of the graph */
int fileDiff; /* True for file diff. False for check-in diff */
int omitDescenders; /* True to omit descenders */
int scrollToSelect; /* True to scroll to the selection */
int dwellTimeout; /* Milliseconds to wait for tooltips to show */
int closeTimeout; /* Milliseconds to wait for tooltips to close */
u8 *aiMap; /* The rail map */
iRailPitch = atoi(PD("railpitch","0"));
showArrowheads = skin_detail_boolean("timeline-arrowheads");
circleNodes = skin_detail_boolean("timeline-circle-nodes");
colorGraph = skin_detail_boolean("timeline-color-graph-lines");
iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0;
omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0;
scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0;
dwellTimeout = atoi(db_get("timeline-dwelltime","250"));
closeTimeout = atoi(db_get("timeline-closetime","3000"));
@ <script id='timeline-data-%d(iTableId)' type='application/json'>{
@ "iTableId": %d(iTableId),
@ "circleNodes": %d(circleNodes),
@ "showArrowheads": %d(showArrowheads),
@ "iRailPitch": %d(iRailPitch),
@ "colorGraph": %d(colorGraph),
@ "nomo": %d(PB("nomo")),
@ "iTopRow": %d(iTopRow),
@ "omitDescenders": %d(omitDescenders),
@ "fileDiff": %d(fileDiff),
@ "scrollToSelect": %d(scrollToSelect),
@ "nrail": %d(pGraph->mxRail+1),
@ "baseUrl": "%R",
@ "dwellTimeout": %d(dwellTimeout),
@ "closeTimeout": %d(closeTimeout),
@ "bottomRowId": "btm-%d(iTableId)",
if( pGraph->nRow==0 ){
@ "rowinfo": null
}else{
@ "rowinfo": [
}
|
| ︙ | ︙ |