|
|
@ -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; |
|
|
|