Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

[Timeline] Align current time #3718

Merged
merged 3 commits into from
Jan 5, 2018

Conversation

ghost
Copy link

@ghost ghost commented Dec 10, 2017

Here's another simple feature I'd love to see in the main branch :)

This PR adds a global option called alignCurrentTime that allows you to specify the unit of time that the current time bar should be aligned to. For example, when setting that parameter to day you can align the current time bar to the start of the day. It's really useful when you don't need a high level of precision and you just want to render a today marker in the timeline (which by definition cannot fall between two days).

It's not mandatory, so if not provided the current time bar will have the same behavior it has today.

Cheers,
Francesco

Copy link
Contributor

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome new feature! Thanks!

@yotamberk yotamberk merged commit d2cfa84 into almende:develop Jan 5, 2018
mojoaxel pushed a commit to visjs/vis_original that referenced this pull request Jun 9, 2019
* add alignCurrentTime option

* update docs

* add available values
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant