Browse Source

Updated docs

css_transitions
josdejong 11 years ago
parent
commit
460e2f872a
6 changed files with 50 additions and 9 deletions
  1. +1
    -2
      HISTORY.md
  2. +8
    -1
      docs/dataset.html
  3. +37
    -2
      docs/timeline.html
  4. +1
    -1
      examples/timeline/05_groups.html
  5. +1
    -1
      src/timeline/component/GroupSet.js
  6. +2
    -2
      src/timeline/component/item/ItemRangeOverflow.js

+ 1
- 2
HISTORY.md View File

@ -3,8 +3,7 @@ http://visjs.org
## <not yet released>, version 0.3.0
- Implemented option `showCurrentTime`, displaying a red, vertical bar at
current time. Thanks fi0dor.
- Implemented options `showCurrentTime` and `showCustomTime`. Thanks fi0dor.
- Fixed broken Timeline options `min` and `max`.
- Fixed not being able to load vis.js in node.js.

+ 8
- 1
docs/dataset.html View File

@ -424,7 +424,7 @@ var items = DataSet.get(options); // retrieve all items or a filtered set
<tr>
<td>filter</td>
<td>function</td>
<td>Function</td>
<td>Items can be filtered on specific properties by providing a filter
function. A filter function is executed for each of the items in the
DataSet, and is called with the item as parameter. The function must
@ -432,6 +432,13 @@ var items = DataSet.get(options); // retrieve all items or a filtered set
true will be emitted.
See section <a href="#Data_Filtering">Data Filtering</a>.</td>
</tr>
<tr>
<td>order</td>
<td>String | Function</td>
<td>Order the items by a field name or custom sort function.</td>
</tr>
</table>
<p>

+ 37
- 2
docs/timeline.html View File

@ -190,7 +190,9 @@ var items = [
<td>type</td>
<td>String</td>
<td>'box'</td>
<td>The type of the item. Can be 'box' (default), 'range', or 'point'.</td>
<td>The type of the item. Can be 'box' (default), 'range', or 'point'.
<!-- TODO: describe rangeoverflow -->
</td>
</tr>
<tr>
<td>group</td>
@ -344,6 +346,15 @@ var options = {
end date.</td>
</tr>
<tr>
<td>groupOrder</td>
<td>String | Function</td>
<td>none</td>
<td>Order the groups by a field name or custom sort function.
By default, groups are not ordered.
</td>
</tr>
<tr>
<td>height</td>
<td>String</td>
@ -399,7 +410,7 @@ var options = {
<tr>
<td>order</td>
<td>function</td>
<td>Function</td>
<td>none</td>
<td>Provide a custom sort function to order the items. The order of the
items is determining the way they are stacked. The function
@ -432,6 +443,16 @@ var options = {
<td>Show a vertical bar at the current time.</td>
</tr>
<tr>
<td>showCustomTime</td>
<td>boolean</td>
<td>false</td>
<td>Show a vertical bar displaying a custom time. This line can be dragged by the user. The custom time can be utilized to show a state in the past or in the future.
<!-- TODO: more docs on showCustomTime
When the custom time bar is dragged by the user, an event is triggered, on which the contents of the timeline can be changed in to the state at that moment in time.--></td>
</tr>
<tr>
<tr>
<td>showMajorLabels</td>
<td>boolean</td>
@ -513,6 +534,19 @@ var options = {
<th>Return Type</th>
<th>Description</th>
</tr>
<tr>
<td>getCustomTime()</td>
<td>Date</td>
<td>Retrieve the custom time. Only applicable when the option <code>showCustomTime</code> is true.
</td>
</tr>
<tr>
<td>setCustomTime(time)</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>
</tr>
<tr>
<td>setGroups(groups)</td>
<td>none</td>
@ -541,6 +575,7 @@ var options = {
</td>
</tr>
</table>

+ 1
- 1
examples/timeline/05_groups.html View File

@ -59,7 +59,7 @@
// create visualization
var container = document.getElementById('visualization');
var options = {
groupsOrder: 'content'
groupOrder: 'content'
};
var timeline = new vis.Timeline(container);

+ 1
- 1
src/timeline/component/GroupSet.js View File

@ -270,7 +270,7 @@ GroupSet.prototype.repaint = function repaint() {
// update the top positions of the groups in the correct order
var orderedGroups = this.groupsData.getIds({
order: this.options.groupsOrder
order: this.options.groupOrder
});
for (i = 0; i < orderedGroups.length; i++) {
(function (group, prevGroup) {

+ 2
- 2
src/timeline/component/item/ItemRangeOverflow.js View File

@ -81,11 +81,11 @@ ItemRangeOverflow.prototype.repaint = function repaint() {
/**
* Return the items width
* @return {Integer} width
* @return {Number} width
*/
ItemRangeOverflow.prototype.getWidth = function getWidth() {
if (this.props.content !== undefined && this.width < this.props.content.width)
return this.props.content.width;
else
return this.width;
}
};

Loading…
Cancel
Save