I’m trying to create a custom extend add functionality for creating events.
Let me try to explain what i’m trying to build.
I’ve a table that shows events, where every events has an duration time.
Then i use the scheduler timeline with a timestep for 15 min.
When hovering on a cell, the cell gets divided into 4 picies (15 min time interval), see image
But the calculation to set the width for every piece is rather strange.
For example when i drag an existing event one hour to left, where one
cell has a widht of 17px, i get the following result
start pos : 290px
+15min : 294px
+15min : 299px
+15min : 303px
Final pos : 307px;
If you look at the difference it goes like this: 4px, 5px, 4px, 4px
Total 17px.
Could somebody tells me how this calculation is being made, so that i’ve 4 correctly divided picies
The end result, for what i’m trying to create is: when a user selects a event from the table the duration will be stored into
a js variable. When the user hovers a timeline cell it will highlight a number of pieces where it could be planned. When the user
clicks it will be actually stored into the timeline.