Skip to content

Commit 2f76e0f

Browse files
committed
Fix right X offset
1 parent 8047eec commit 2f76e0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

glue/crumble/draw/timeline_viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function drawTimeline(ctx, snap, propagatedMarkerLayers, timesliceQubitCoordsFun
160160
const offsetY = Math.max(-maxOffsetY, Math.min(0, snap.timelineOffsetY ?? 0));
161161

162162
const lastLayerOffset = (numLayers - 1 - snap.curLayer - (min_t_clamp - min_t_free)) * x_pitch;
163-
const minOffsetX = -Math.max(0, 0.5 * w + lastLayerOffset);
163+
const minOffsetX = -Math.max(0, lastLayerOffset - 0.5 * w + 2*x_pitch);
164164
const maxOffsetX = Math.max(0, (min_t_clamp - 1) * x_pitch);
165165
const offsetX = Math.max(minOffsetX, Math.min(maxOffsetX, snap.timelineOffsetX ?? 0));
166166

0 commit comments

Comments
 (0)