Fossil

Check-in [e63da90d]
Login

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

Overview
Comment:For timeline graphs on narrow screens, set the rail pitch to its minimum value to conserve horizontal space.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e63da90deeca0c64597699a56614bfef694afeb3c3c1c4df7b3cc0a3b7a39af7
User & Date: drh 2018-08-20 19:30:31.844
Context
2018-08-20
23:36
Add 10% more horizontal space in columns of the file browser /dir page. ... (check-in: 0acb670e user: drh tags: trunk)
19:30
For timeline graphs on narrow screens, set the rail pitch to its minimum value to conserve horizontal space. ... (check-in: e63da90d user: drh tags: trunk)
19:15
When displaying a timeline on a narrow screen, move the date to the third column to make the first column narrower. ... (check-in: 8fc7c1b1 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.js.
105
106
107
108
109
110
111



112
113
114
115
116
117
118

119
120
121
122
123
124
125
    line = elems.line;
    mArrow = elems.arrow_merge_r;
    mLine = elems.line_merge;
    wArrow = elems.arrow_warp;
    wLine = elems.line_warp;
  
    var minRailPitch = Math.ceil((node.w+line.w)/2 + mArrow.w + 1);



    if( tx.iRailPitch>0 ){
      railPitch = tx.iRailPitch;
    }else{
      railPitch = elems.rail.w;
      railPitch -= Math.floor((tx.nrail-1)*(railPitch-minRailPitch)/21);
    }
    railPitch = Math.max(railPitch, minRailPitch);

  
    if( tx.nomo ){
      mergeOffset = 0;
    }else{
      mergeOffset = railPitch-minRailPitch-mLine.w;
      mergeOffset = Math.min(mergeOffset, elems.mergeoffset.w);
      mergeOffset = mergeOffset>0 ? mergeOffset + line.w/2 : 0;







>
>
>
|
|
|
|
|
|
|
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
    line = elems.line;
    mArrow = elems.arrow_merge_r;
    mLine = elems.line_merge;
    wArrow = elems.arrow_warp;
    wLine = elems.line_warp;
  
    var minRailPitch = Math.ceil((node.w+line.w)/2 + mArrow.w + 1);
    if( window.innerWidth<400 ){
      railPitch = minRailPitch;
    }else{
      if( tx.iRailPitch>0 ){
        railPitch = tx.iRailPitch;
      }else{
        railPitch = elems.rail.w;
        railPitch -= Math.floor((tx.nrail-1)*(railPitch-minRailPitch)/21);
      }
      railPitch = Math.max(railPitch, minRailPitch);
    }
  
    if( tx.nomo ){
      mergeOffset = 0;
    }else{
      mergeOffset = railPitch-minRailPitch-mLine.w;
      mergeOffset = Math.min(mergeOffset, elems.mergeoffset.w);
      mergeOffset = mergeOffset>0 ? mergeOffset + line.w/2 : 0;