Browse Source

Fixed #629: timeline not properly initializing with a DataView for groups

v3_develop
jos 9 years ago
parent
commit
681f305c92
2 changed files with 10 additions and 3 deletions
  1. +7
    -0
      HISTORY.md
  2. +3
    -3
      lib/timeline/Timeline.js

+ 7
- 0
HISTORY.md View File

@ -2,6 +2,13 @@
http://visjs.org http://visjs.org
## not yet released, version 3.10.1-SNAPSHOT
### Timeline
- Fixed not property initializing with a DataView for groups.
## 2015-02-11, version 3.10.0 ## 2015-02-11, version 3.10.0
### Network ### Network

+ 3
- 3
lib/timeline/Timeline.js View File

@ -13,8 +13,8 @@ var ItemSet = require('./component/ItemSet');
/** /**
* Create a timeline visualization * Create a timeline visualization
* @param {HTMLElement} container * @param {HTMLElement} container
* @param {vis.DataSet | Array | google.visualization.DataTable} [items]
* @param {vis.DataSet | Array | google.visualization.DataTable} [groups]
* @param {vis.DataSet | vis.DataView | Array | google.visualization.DataTable} [items]
* @param {vis.DataSet | vis.DataView | Array | google.visualization.DataTable} [groups]
* @param {Object} [options] See Timeline.setOptions for the available options. * @param {Object} [options] See Timeline.setOptions for the available options.
* @constructor * @constructor
* @extends Core * @extends Core
@ -25,7 +25,7 @@ function Timeline (container, items, groups, options) {
} }
// if the third element is options, the forth is groups (optionally); // if the third element is options, the forth is groups (optionally);
if (!(Array.isArray(groups) || groups instanceof DataSet) && groups instanceof Object) {
if (!(Array.isArray(groups) || groups instanceof DataSet || groups instanceof DataView) && groups instanceof Object) {
var forthArgument = options; var forthArgument = options;
options = groups; options = groups;
groups = forthArgument; groups = forthArgument;

Loading…
Cancel
Save