Skip to content

The swiss army knife of lossless video/audio editing

fix zoom direction

Mikael Finstadaed1e05dd3c2
diff --git a/src/Timeline.jsx b/src/Timeline.jsx
index afb1249b..9ad9a9a2 100644
--- a/src/Timeline.jsx
+++ b/src/Timeline.jsx
@@ -152,13 +152,12 @@ const Timeline = memo(({
const { pixelX, pixelY } = normalizeWheel(e);
// console.log({ spinX, spinY, pixelX, pixelY });
- const seekDirection = invertTimelineScroll ? 1 : -1;
- const zoomDirection = invertTimelineScroll ? -1 : 1;
+ const direction = invertTimelineScroll ? 1 : -1;
if (e.ctrlKey) {
- zoomRel(zoomDirection * (pixelY) * wheelSensitivity * 0.4);
+ zoomRel(direction * (pixelY) * wheelSensitivity * 0.4);
} else {
- seekRel(seekDirection * (pixelX + pixelY) * wheelSensitivity * 0.2);
+ seekRel(direction * (pixelX + pixelY) * wheelSensitivity * 0.2);
}
}, [seekRel, zoomRel, wheelSensitivity, invertTimelineScroll]);