almende / vis

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

vis.js TIMELINE: Unable to get itens positioning fixed! #3351

Open tnatanael opened 6 years ago

tnatanael commented 6 years ago

Hi Guys, i need some help here if possible... I just want to know if i would need to work on the lib code or theres an already way to achieve what i want... I have read all the documentation and bug reporting list trying to find comething that could help me, but without sucess... The problem: I have a timeline with itens of type box, and i need just to position them in fixed rows, here goes what i need: example 1

But after some horizontal dragging the timeline this happens: example 2

And, it happens because of this: example 3

Witch is something i dont want, i just need the itens to be locked in two rows, like in the first image...

Here is the code of initialization of the timeline

var options = {
    timeAxis: {scale: 'minute', step: 1},
    end: moment(),
    start: moment().subtract(10, 'minute'),
        maxHeight: '240px',
    zoomable: false,
    verticalScroll: false,
        horizontalScroll: true,
    //zoomMax: 3600000, 1 Hora
    zoomMax: 1200000, // 20 Minutos
    zoomMin: 1200000,
    autoResize: false,
    snap: null
};

I have tryed every option possible in the documentation, but nothing have worked.

If this is a bug or just a caracteristic of the lib, can someone point me where is the code that i need to change to walkthrough this?

Thanks a LOT!

yotamberk commented 6 years ago

Umm not quite sure what your trying to achieve. The code for stacking is in stack.js. I would start looking there

tnatanael commented 6 years ago

Thank you for the answer! I'll look that file...

What i need is just, lock the timeline in two rows like the first image, but the timeline renders the thirth row randomly, after some horizontal dragging, this appears to be buggy, i just dont need the vertical dragging, i need the timeline vertical stacked locked in two rows.

Thanks again!

yotamberk commented 6 years ago

So will a stacking limit help?

tnatanael commented 6 years ago

It will help a LOT