almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.86k stars 1.48k forks source link

Timeline: Items disappear on zoom #4234

Open Fiorello opened 5 years ago

Fiorello commented 5 years ago

Hi, i have a problem with the timeline component. When the zoom level changes, some elements disappear. I used the latest available version of vis.js. This is my configuration:

      height: '100%',
      locale: 'it',
      start: moment.utc(resourceDate).toDate(),
      end: moment.utc(endDate).toDate(),
      showCurrentTime: false,
      zoomMin: 3600000 / 5,
      zoomMax: 31536000000,
      type: 'range',
      moveable: true,
      zoomable: true,

I'm using more type of items, range and box. Maybe I'm doing something wrong in the configuration or is it actually a bug?

ezgif com-video-to-gif

jgorene commented 5 years ago

Hello, Just to find out more if needed ;) Have you also tested on an earlier version with 4.20.1 for example or even lower down to 4.19.1

Fiorello commented 5 years ago

I've just tried with version 4.19.1 and the same thing happens. :|

jgorene commented 5 years ago

@Fiorello I looked at the gif (with a 200% screen zoom;) and even tried to reproduce it but without success. With just a jsbin, we would probably see a little more clearly. Thank you...

Fiorello commented 5 years ago

Finally I found the time to create the fiddle, here it is: http://jsfiddle.net/asmjk21g/3/ Initially the elements are not visible, but just change the zoom and some are displayed.

I thought it was a problem of my custom css, but I realized by analyzing the elements of the DOM that the div are just removed.

I understand what causes the problem, if in the fiddle that I have linked try to remove the height parameter, the problem does not seem to occur.

Thanks for your time.