Fossil

Check-in [d3f9b8ab78]
Login

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

Overview
Comment:Fix a bug when handling timeline data blocks not containing any check-ins.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | timeline-keyboard-navigation
Files: files | file ages | folders
SHA3-256: d3f9b8ab78377fa713efc5ec51830aff584030044a72f328426c27218f797951
User & Date: florian 2022-10-30 12:53:00.000
Context
2022-10-30
12:53
Fix a bug when handling timeline data blocks not containing any check-ins. ... (Leaf check-in: d3f9b8ab78 user: florian tags: timeline-keyboard-navigation)
2022-10-03
11:18
Check the meta key modifier (⊞|⌘|◆) when processing keyboard events. ... (check-in: 11bb41e09e user: florian tags: timeline-keyboard-navigation)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
927
928
929
930
931
932
933

934
935
936
937
938
939
940
941
    function timelineGetDataBlock(i){
      var tb = document.getElementById('timeline-data-' + i);
      return tb ? JSON.parse(tb.textContent || tb.innerText) : null;
    }
    function timelineGetRowInfo(id){
      var ti;
      for(var i=0; ti=timelineGetDataBlock(i); i++){

        for( var k=0; k<ti.rowinfo.length; k++ ){
          if( id=='m' + ti.rowinfo[k].id ) return {
            'baseurl': ti.baseUrl,
            'filehash': ti.fileDiff,
            'hashdigits': ti.hashDigits,
            'hash': ti.rowinfo[k].h,
            'branch': ti.rowinfo[k].br
          };







>
|







927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
    function timelineGetDataBlock(i){
      var tb = document.getElementById('timeline-data-' + i);
      return tb ? JSON.parse(tb.textContent || tb.innerText) : null;
    }
    function timelineGetRowInfo(id){
      var ti;
      for(var i=0; ti=timelineGetDataBlock(i); i++){
        // NOTE: `ti.rowinfo' only available if data block contains check-ins.
        for( var k=0; ti.rowinfo && k<ti.rowinfo.length; k++ ){
          if( id=='m' + ti.rowinfo[k].id ) return {
            'baseurl': ti.baseUrl,
            'filehash': ti.fileDiff,
            'hashdigits': ti.hashDigits,
            'hash': ti.rowinfo[k].h,
            'branch': ti.rowinfo[k].br
          };