Skip to content

fix: On time change called (no before) on item drag#893

Open
DanielDerma wants to merge 2 commits intonamespace-ee:mainfrom
DanielDerma:onTimeChange-called-before-onItemDrag
Open

fix: On time change called (no before) on item drag#893
DanielDerma wants to merge 2 commits intonamespace-ee:mainfrom
DanielDerma:onTimeChange-called-before-onItemDrag

Conversation

@DanielDerma
Copy link

#838

Link issue.

I think that is a misunderstanding with the bug, why it should have been called onTimeChange when I drag i item?

docs:

onTimeChange(visibleTimeStart, visibleTimeEnd, updateScrollCanvas, unit)

A function that's called when the user tries to scroll. Call the passed updateScrollCanvas(start, end) with the updated visibleTimeStart and visibleTimeEnd (as unix timestamps in milliseconds) to change the scroll behavior, for example to limit scrolling.

@Ilaiwi
Copy link
Collaborator

Ilaiwi commented Dec 29, 2022

@florianbepunkt @MertHaddad can you help verify this PR please

@lnagel lnagel added the outdated label Feb 5, 2026
@lnagel
Copy link
Member

lnagel commented Feb 5, 2026

This PR has been marked as outdated. Here's why:

This PR modified src/lib/Timeline.js (a JavaScript class component) to include selectedItem in the isInteractingWithItem check, which controlled whether onTimeChange was triggered during item drags. The entire codebase has since been rewritten from JavaScript to TypeScript — the target file is now src/lib/Timeline.tsx. Additionally, the scroll and interaction logic has been refactored in v0.30.0-beta.5, and the isInteractingWithItem variable in the current code (!!draggingItem || !!resizingItem) is used in a different context. The specific behavioral issue from #838 would need to be re-evaluated against the current TypeScript implementation to determine if it still exists.

Thank you for the contribution! The idea/fix was appreciated even if the codebase has moved on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants