Our pure JavaScript Scheduler component


Post by jeffallen6767 »

Hi,

Is there a way to calculate the pixel width of one minute? I am decorating events with custom html and need to size the decoration in pixels based on time ( like 10 minutes ), this would need to work no matter which preset / zoom level is used.

Thanks,
Jeff


Post by mats »

You can use this method on the timeAxisViewModel: https://bryntum.com/docs/scheduler/api/Scheduler/view/model/TimeAxisViewModel#function-getDistanceForDuration

scheduler.timeAxisViewModel.getDistanceForDuration(124);

Post by jeffallen6767 »

Great, Thank you!


Post Reply