@ -737,16 +737,30 @@ timeline.clear({options: true}); // clear options only
</tr>
</tr>
<tr>
<tr>
<td>fit()</td>
<td>fit([options])</td>
<td>none</td>
<td>none</td>
<td>Adjust the visible window such that it fits all items. See also function <code>focus(id)</code>.
<td>Adjust the visible window such that it fits all items. See also function <code>focus(id)</code>.
Available options:
<ul>
<li><code>animate: boolean | number</code><br>If true (default), the range is animated smoothly to the new window. If a number, the number is taken as duration for the animation. Default duration is 500 ms.</li>
</ul>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>focus(id | ids)</td>
<td>focus(id | ids [, options])</td>
<td>none</td>
<td>none</td>
<td>Adjust the visible window such that the selected item (or multiple items) are centered on screen. See also function <code>fit()</code>.
<td>Adjust the visible window such that the selected item (or multiple items) are centered on screen. See also function <code>fit()</code>. Available options:
<ul>
<li><code>animate: boolean | number</code><br>If true (default), the range is animated smoothly to the new window. If a number, the number is taken as duration for the animation. Default duration is 500 ms.</li>
</ul>
</td>
</tr>
<tr>
<td>getCurrentTime()</td>
<td>Date</td>
<td>Get the current time. Only applicable when option <code>showCurrentTime</code> is true.
</td>
</td>
</tr>
</tr>
@ -757,10 +771,18 @@ timeline.clear({options: true}); // clear options only
</td>
</td>
</tr>
</tr>
<tr>
<td>setCurrentTime(time)</td>
<td>none</td>
<td>Set a current time. This can be used for example to ensure that a client's time is synchronized with a shared server time.
<code>time</code> can be a Date object, numeric timestamp, or ISO date string.
Only applicable when option <code>showCurrentTime</code> is true.</td>
</tr>
<tr>
<tr>
<td>setCustomTime(time)</td>
<td>setCustomTime(time)</td>
<td>none</td>
<td>none</td>
<td>Adjust the custom time bar. Only applicable when the option <code>showCustomTime</code> is true. <code>time</code> is a Date object.
<td>Adjust the custom time bar. Only applicable when the option <code>showCustomTime</code> is true. <code>time</code>can be a Date object, numeric timestamp, or ISO date string.
</td>
</td>
</tr>
</tr>
@ -829,19 +851,24 @@ timeline.clear({options: true}); // clear options only
</tr>
</tr>
<tr>
<tr>
<td>setSelection([ids [, options]])</td>
<td>setSelection(id | ids [, options])</td>
<td>none</td>
<td>none</td>
<td>Select one or multiple items by their id. The currently selected items will be unselected. To unselect all selected items, call `setSelection([])`. Available options:
<td>Select one or multiple items by their id. The currently selected items will be unselected. To unselect all selected items, call `setSelection([])`. Available options:
<ul>
<ul>
<li><code>focus: boolean</code>. If true, focus will be set to the selected item(s)</li>
<li><code>focus: boolean</code><br>If true, focus will be set to the selected item(s)</li>
<li><code>animate: boolean | number</code><br>If true (default), the range is animated smoothly to the new window. If a number, the number is taken as duration for the animation. Default duration is 500 ms. Only applicable when option focus is true.</li>
</ul>
</ul>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>setWindow(start, end)</td>
<td>setWindow(start, end [, options])</td>
<td>none</td>
<td>none</td>
<td>Set the current visible window. The parameters <code>start</code> and <code>end</code> can be a <code>Date</code>, <code>Number</code>, or <code>String</code>. If the parameter value of <code>start</code> or <code>end</code> is null, the parameter will be left unchanged.</td>
<td>Set the current visible window. The parameters <code>start</code> and <code>end</code> can be a <code>Date</code>, <code>Number</code>, or <code>String</code>. If the parameter value of <code>start</code> or <code>end</code> is null, the parameter will be left unchanged. Available options:
<ul>
<li><code>animate: boolean | number</code><br>If true (default), the range is animated smoothly to the new window. If a number, the number is taken as duration for the animation. Default duration is 500 ms.</li>