namespace-ee / react-calendar-timeline

A modern and responsive react timeline component.
MIT License
1.91k stars 613 forks source link

Demo/move resize items moves timeline when item close to left right border #875

Open davidbejarcaceres opened 1 year ago

davidbejarcaceres commented 1 year ago

Issue

Solution for issue #783. Use the moveResizeValidator() function to move/resize an item close to the left/right border of the timeline, and auto scroll the timeline bounds to the direction of the move/resize item. By doing this you can keep moving/resizing the item without to stop, move timeline and move/resize again and item.

Overview of PR

Move item left/right Here you can see the functionality to auto scroll timeline when move item close to left/right borders:

https://user-images.githubusercontent.com/17320214/194678168-c9127ef3-3ed1-4fc0-a375-ead7137f40b9.mp4

Resize edges of item left/right Now for resize item close to left/right borders:

https://user-images.githubusercontent.com/17320214/194678177-7315d699-3f3c-4482-bf5a-9aa383f1d508.mp4

Check tests passed Yes, no errors when running yarn run test, no many changes to library itself, just extra params to the moveResizeValidator function in Iitem.js.