Browse Source

Fixed #1491: Problem using ctrl+drag in combination with using a `DataView`, and an issue with ctrl+drag when using `snap: null`

codeClimate
jos 9 years ago
parent
commit
5fd3efceb2
3 changed files with 5 additions and 3 deletions
  1. +3
    -1
      HISTORY.md
  2. +1
    -1
      lib/DataSet.js
  3. +1
    -1
      lib/timeline/component/ItemSet.js

+ 3
- 1
HISTORY.md View File

@ -12,7 +12,9 @@ http://visjs.org
- Fixed #1441: Height of subgroups not immediately updated after updating
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
- Implemented a new option for `shaded.orientation` to always shade towards zero.

+ 1
- 1
lib/DataSet.js View File

@ -357,7 +357,7 @@ DataSet.prototype.get = function (args) {
if (id != undefined) {
// return a single item
item = me._getItem(id, type);
if (filter && !filter(item)) {
if (item && filter && !filter(item)) {
item = null;
}
}

+ 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 scale = this.body.util.getScale();
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 itemData = {

Loading…
Cancel
Save