Browse Source

Merge branch 'develop' of github.com:almende/vis into develop

codeClimate
Ludo Stellingwerff 8 years ago
parent
commit
5d90e67c41
4 changed files with 10 additions and 5 deletions
  1. +6
    -1
      HISTORY.md
  2. +2
    -2
      lib/DataSet.js
  3. +1
    -1
      lib/timeline/component/DataAxis.js
  4. +1
    -1
      lib/timeline/component/ItemSet.js

+ 6
- 1
HISTORY.md View File

@ -12,13 +12,18 @@ http://visjs.org
- Fixed #1441: Height of subgroups not immediately updated after updating - Fixed #1441: Height of subgroups not immediately updated after updating
data in a DataSet or DataView. data in a DataSet or DataView.
- Fixed #1491: Problem using ctrl+drag in combination with using a `DataView`,
and an issue with ctrl+drag when using `snap: null`.
### Graph2d ### Graph2d
- Implemented a new option for `shaded.orientation` to always shade towards zero. - Implemented a new option for `shaded.orientation` to always shade towards zero.
Thanks @ludost. Thanks @ludost.
- Fixed support for using a `DataView` in Graph2d. Thanks @ludost. - Fixed support for using a `DataView` in Graph2d. Thanks @ludost.
### DataSet
- Fixed #1487: DataSet cannot remove an item with id `0` correctly.
## 2015-11-27, version 4.10.0 ## 2015-11-27, version 4.10.0

+ 2
- 2
lib/DataSet.js View File

@ -357,7 +357,7 @@ DataSet.prototype.get = function (args) {
if (id != undefined) { if (id != undefined) {
// return a single item // return a single item
item = me._getItem(id, type); item = me._getItem(id, type);
if (filter && !filter(item)) {
if (item && filter && !filter(item)) {
item = null; item = null;
} }
} }
@ -704,7 +704,7 @@ DataSet.prototype._remove = function (id) {
} }
else if (id instanceof Object) { else if (id instanceof Object) {
var itemId = id[this._fieldId]; var itemId = id[this._fieldId];
if (itemId && this._data[itemId]) {
if (itemId !== undefined && this._data[itemId]) {
delete this._data[itemId]; delete this._data[itemId];
this.length--; this.length--;
return itemId; return itemId;

+ 1
- 1
lib/timeline/component/DataAxis.js View File

@ -59,7 +59,7 @@ function DataAxis (body, options, svg, linegraphOptions) {
this.setOptions(options); this.setOptions(options);
this.width = Number(('' + this.options.width).replace("px","")); this.width = Number(('' + this.options.width).replace("px",""));
this.minWidth = this.width; this.minWidth = this.width;
this.height = this.linegraphSVG.offsetHeight;
this.height = this.linegraphSVG.getBoundingClientRect().height;
this.hidden = false; this.hidden = false;
this.stepPixels = 25; this.stepPixels = 25;

+ 1
- 1
lib/timeline/component/ItemSet.js View File

@ -1248,7 +1248,7 @@ ItemSet.prototype._onDragStartAddItem = function (event) {
var time = this.body.util.toTime(x); var time = this.body.util.toTime(x);
var scale = this.body.util.getScale(); var scale = this.body.util.getScale();
var step = this.body.util.getStep(); var step = this.body.util.getStep();
var start = snap ? snap(time, scale, step) : start;
var start = snap ? snap(time, scale, step) : time;
var end = start; var end = start;
var itemData = { var itemData = {

Loading…
Cancel
Save