Timeline.ScrollSpeed

Syntax

ScrollSpeed: Number

Description

The ScrollSpeed property sets speed of timeline scrolling.

Comments

Use JSON or the setScrollSpeed method to set the property value, and the getScrollSpeed method to get the property value.

By default this property is set to 1.

Scrolling is allowed if not all the steps fit into the timeline.

Example

To execute the example, the page must contain the Timeline component named timeline (see Example of creating the Timeline component). Show all steps in the timeline and add new steps, next increase the number of steps by which the line is scrolled:

// Get array of timeline tick marks
var stepsNames = timeline.getStepsNames();
// Add new tick marks
stepsNames.push(2011, 2012, 2013, 2014, 2015);
// Make all tick marks visible
for (var i in timeline.getStepsVisibility()) {
    if (timeline.getStepsVisibility()[i] == undefined) {
        timeline.getStepsVisibility().push(True)
    } else {
        timeline.getStepsVisibility()[i] = True
    }
};
// Set timeline scrolling step by 3 elements
timeline.setScrollSpeed(3);
// Rerender timeline
timeline._render();

After executing the example all steps are shown in the timeline and five new steps are added:

The number of steps by which the timeline is scrolled, increases to three. To check it, scroll the line to the right by clicking the rightmost button once:

See also:

Timeline