almende / vis

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

Different height of timeline for desktop and mobile device #3466

Open DejanBelic opened 6 years ago

DejanBelic commented 6 years ago

Is it possible to set different height of timeline for desktop and mobile. I've tried for mobile. And before that set in options verticalScroll to true and height of 900,

if (jQuery.browser.mobile === true) {

var jeste = 300;

} else {

var jeste = 900;

}

var options = { orientation: 'top', locale: 'nl', height: jeste, horizontalScroll: true, verticalScroll: true, zoomKey: 'ctrlKey', autoResize: true } timeline = new vis.Timeline(container, items, groups, options);

jmoraltu commented 6 years ago

I would to this

var jeste;

if (jQuery.browser.mobile === true) {

jeste = 300px;

} else {

jeste = 900px;

} Don't forget to add the px or em or whatever metric you want to use;

On Wed, Sep 20, 2017 at 4:27 PM, Dejan Belic notifications@github.com wrote:

Is it possible to set different height of timeline for desktop and mobile. I've tried for mobile. And before that set in options verticalScroll to true and height of 900,

if (jQuery.browser.mobile === true) {

var jeste = 300;

} else {

var jeste = 900;

}

var options = { orientation: 'top', locale: 'nl', height: jeste, horizontalScroll: true, verticalScroll: true, zoomKey: 'ctrlKey', autoResize: true } timeline = new vis.Timeline(container, items, groups, options);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/almende/vis/issues/3466, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNP_IntIqCds6G9j1JEhtHNPQxdWSH8ks5skSDUgaJpZM4Pd9Ul .