Skip to content

Commit c6380f9

Browse files
committed
refactor(timeline): simplify camera dragging
1 parent bd45b5a commit c6380f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/app-frontend/src/features/timeline/TimelineView.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,12 +1290,12 @@ export default defineComponent({
12901290
}
12911291
12921292
if (cameraDragging) {
1293-
const deltaX = (startDragX - x) / window.devicePixelRatio
1294-
const deltaY = (startDragY - y) / window.devicePixelRatio
1293+
const deltaX = (startDragX - x)
1294+
const deltaY = (startDragY - y)
12951295
12961296
// Horizontal
12971297
const size = endTime.value - startTime.value
1298-
const viewWidth = wrapper.value.offsetWidth
1298+
const viewWidth = app.view.width
12991299
const delta = deltaX / viewWidth * size
13001300
let start = startTime.value = startDragTime + delta
13011301
if (start < minTime.value) {

0 commit comments

Comments
 (0)