@@ -199,13 +199,13 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
199
199
{
200
200
var major = null as PathHelper ;
201
201
var isMerged = commit . IsMerged ;
202
- var oldCount = unsolved . Count ;
203
202
204
203
// Update current y offset
205
204
offsetY += UNIT_HEIGHT ;
206
205
207
206
// Find first curves that links to this commit and marks others that links to this commit ended.
208
- double offsetX = H_MARGIN - HALF_WIDTH ;
207
+ var offsetX = 4 - HALF_WIDTH ;
208
+ var maxOffsetOld = unsolved . Count > 0 ? unsolved [ ^ 1 ] . LastX : offsetX + UNIT_WIDTH ;
209
209
foreach ( var l in unsolved )
210
210
{
211
211
if ( l . Next == commit . SHA )
@@ -311,7 +311,7 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
311
311
312
312
// Margins & merge state (used by Views.Histories).
313
313
commit . IsMerged = isMerged ;
314
- commit . Margin = new Thickness ( Math . Max ( offsetX + HALF_WIDTH , oldCount * UNIT_WIDTH + H_MARGIN ) + H_MARGIN , 0 , 0 , 0 ) ;
314
+ commit . Margin = new Thickness ( Math . Max ( offsetX , maxOffsetOld ) + HALF_WIDTH + H_MARGIN , 0 , 0 , 0 ) ;
315
315
}
316
316
317
317
// Deal with curves haven't ended yet.
@@ -323,7 +323,7 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
323
323
if ( path . Path . Points . Count == 1 && Math . Abs ( path . Path . Points [ 0 ] . Y - endY ) < 0.0001 )
324
324
continue ;
325
325
326
- path . End ( ( i + 0.5 ) * UNIT_WIDTH + H_MARGIN , endY + HALF_HEIGHT , HALF_HEIGHT ) ;
326
+ path . End ( ( i + 0.5 ) * UNIT_WIDTH + 4 , endY + HALF_HEIGHT , HALF_HEIGHT ) ;
327
327
}
328
328
unsolved . Clear ( ) ;
329
329
0 commit comments