visjs / vis-timeline

📅 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
https://visjs.github.io/vis-timeline/
Other
1.88k stars 319 forks source link

Timeline behaves weirdly inside a div with padding #403

Open Bottelet opened 4 years ago

Bottelet commented 4 years ago

I have a problem with vis-timeline editing/drag n drop, and padding, whenever trying to move an item to another day the item will jump over the last couple of hours, and integrate very weirdly with the day separator.

This happens whenever the parent div of the timeline has padding.

<div class="wrapper" style="padding-left:100px">
   <div id="visualization"></div>  
</div>

This is tested on Chrome. Here is a js fiddle that reproduces the problem: https://jsfiddle.net/hwLqpotf/

yotamberk commented 4 years ago

you have hiddenDates. the item disappears in those areas

Bottelet commented 4 years ago

@yotamberk I know but the movement is still very weird if you remove the padding the flow is very smooth... See the difference between this fiddle and the other: https://jsfiddle.net/59okgt6h/

The only thing different is the padding on the wrapper removed. HiddenDates are active on both.

Bottelet commented 4 years ago

On the left you see it with padding, and on the right without padding [image: timeline.gif]

Den tir. 7. apr. 2020 kl. 14.37 skrev Yotam Berkowitz < notifications@github.com>:

I actually don't see a difference in my computer. sorry. Can you send a gif?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/visjs/vis-timeline/issues/403#issuecomment-610361443, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXDE6TF2GCFOQQK3ZLLT43RLMNCDANCNFSM4LXMLQIA .