Skip to content

Commit d6f50d1

Browse files
committed
doc
1 parent 57f2e4e commit d6f50d1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,17 @@ function (visibleTimeStart, visibleTimeEnd) {
225225
Called when the calendar is first initialised
226226

227227
### onBoundsChange
228-
Called when the bounds in the calendar's canvas change.
228+
Called when the bounds in the calendar's canvas change. (see "Behind the scenes" below)
229229

230230
### children
231231
All children of the Timeline component will be displayed above the sidebar. Use this to display small filters or so.
232+
233+
234+
## Behind the scenes
235+
The timeline is built with speed, usability and extensibility in mind.
236+
237+
Speed: The calendar itself is actually a 3x wide scrolling canvas of the screen. All scroll events left and right happen naturally, like scrolling any website. When the timeline has scrolled enough (50% of the invisible surface on one side), we change the "position:absolute;left:{num}px;" variables of each of the visible items and scroll the canvas back. When this happens, the `onBoundsChange` prop is called.
238+
239+
This results in a visually endless scrolling canvas with optimal performance.
240+
241+
Extensibility and usability: While some parameters (`onTimeChange`, `moveResizeValidator`) might be hard to configure, these are design decisions to make it as extensible as possible. If you have recipes for common tasks regarding those parameters, send a PR to add them to this doc.

0 commit comments

Comments
 (0)