xzdarcy / react-timeline-editor

react-timeline-editor is a react component used to quickly build a timeline animation editor.
https://zdarcy.com/
MIT License
284 stars 82 forks source link

Pass estimatedColumnSize to Grid component in time_area.tsx #43

Closed mirko796 closed 3 months ago

mirko796 commented 5 months ago

Hi there,

First I want to thank you for making such a great component, you saved me a lot of time.

While using react-timeline-editor I noticed something strange when timeline gets longer ( for examplescaleCount=10000, scaleWidth=100,scaleSplitCount=10 ), the timebar started to scroll much faster for some reason.

Then I noticed that problem goes away if I set scaleSplitcount to 1.

After some digging, the problem was narrowed down to instantiating the Grid component from react-virtualized. \ Namely, since estimatedColumnSize was not passed down, it allocated much longer width than necessary in this case.

This PR contains fix for it.

You can also review differences in behaviour of current reat-timeline-editor vs the fixed one on following links:

Let me know if I can help you in any other way

Best regards, Mirko