netzwerg / react-svg-timeline

React event timeline component based on SVG
Other
94 stars 26 forks source link

Unable to zoom in/out the timeline when there is at least one selected event #117

Open zhenghow93 opened 9 months ago

zhenghow93 commented 9 months ago

Whenever there is at least one selected event, the <MouseCursor /> component is hidden, the logic is as shown in line 132 of the file /src/timeline/layers/interaction/Interaction.tsx, hence making zoom-in or zoom-out impossible via mouse click.

Is there a specific reason for this behaviour? I can resort to pinning the event instead of selecting the event if I still need the zoom to function while having the selected events highlighted, but styling options will be different (I can't assign fillColor pinned events).

netzwerg commented 9 months ago

I honestly don't remember why we changed it this way 🙈 Could it be that selecting events otherwise leads to unintentional zooming?

Feel free to just fork the repository and change the logic according to your needs.

zhenghow93 commented 9 months ago

Thanks for the reply. We did fork it and made quite a number of functional and aesthetic customizations which are configurable via props. I'm asking for permission from my workplace whether it's fine to make a pull request to this repo. It'll be useful for the community

shivika commented 4 months ago

@zhenghow93 - were you able to get your fork available? I would like to see your customizations as well. Thanks!