Browse Source

Fixed #1486: Item range sometimes wrongly calculated on IE in case of old dates

codeClimate
jos 8 years ago
parent
commit
d866866f43
5 changed files with 749 additions and 682 deletions
  1. +1
    -0
      HISTORY.md
  2. +725
    -659
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +18
    -18
      dist/vis.min.js
  5. +4
    -4
      lib/timeline/Timeline.js

+ 1
- 0
HISTORY.md View File

@ -14,6 +14,7 @@ http://visjs.org
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`.
- Fixed #1486: Item range sometimes wrongly calculated on IE in case of old dates.
### Graph2d

+ 725
- 659
dist/vis.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 18
- 18
dist/vis.min.js
File diff suppressed because it is too large
View File


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

@ -379,8 +379,8 @@ Timeline.prototype.fit = function (options) {
Timeline.prototype.getItemRange = function () {
// get a rough approximation for the range based on the items start and end dates
var range = this.getDataRange();
var min = range.min;
var max = range.max;
var min = range.min.valueOf();
var max = range.max.valueOf();
var minItem = null;
var maxItem = null;
@ -407,8 +407,8 @@ Timeline.prototype.getItemRange = function () {
var start = getStart(item);
var end = getEnd(item);
var left = new Date(start - (item.getWidthLeft() + 10) * factor);
var right = new Date(end + (item.getWidthRight() + 10) * factor);
var left = start - (item.getWidthLeft() + 10) * factor;
var right = end + (item.getWidthRight() + 10) * factor;
if (left < min) {
min = left;

Loading…
Cancel
Save