Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

RangeItems does not resize correctly when part of item is outside left border of timeline. #98

Open
jussila opened this issue Jan 15, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@jussila
Copy link

jussila commented Jan 15, 2019

Hi,
After upgrading from vis.js to timeline-plus i noticed that the width of my range items is not resizing as earlier when part of the item is outside the left border of the timeline. As my css for the items is dependent on the width of the container it messes up my items.

This is because line 330 in rangeItem.js is commented.
// this.dom.content.style.width = 'calc(100% - ${contentStartPosition}px)';

If i put that line back it works as before.
I dont know why this line has been commented and if it does affect something else but my question is if it would be possible to put it back in?

@yotamberk yotamberk added the bug Something isn't working label Jan 19, 2019
@yotamberk
Copy link
Owner

Can you please supply a jsbin?
This was causing at the time a different issue that was solved by commenting this line.
With this line, stacking was sometimes working weirdly. I can look in to the problem you're encountering if you supply a jsbin

@jussila
Copy link
Author

jussila commented Jan 30, 2019

This is how i expect this to work, as it is working in vis.js
https://jsbin.com/xiguqukiwo/1/edit?html,js,output

And this is how it works in timeline-plus at the moment.
https://jsbin.com/dizidozewi/1/edit?html,css,js,output

If i remove the width 100% on .timeline-item-content i dont get the full width and with it the content gets pushed outside the item.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants