almende/vis — pull request #100 by Remper (2014-04-22 15:01:52+00:00)
Title: Fixed setRange bug in Timeline

Hello! I've found pretty interesting bug:
we set zoomMax to some value, then we add some items to timeline. If they can't fit in the zoomMax — `Range.prototype._applyRange()` rejects range changes because `(end - start) > zoomMax`. This can't be correct behavior because I end up being at current date instead of being somewhere near to my items.
So I propose this fix — we just check if `end - start` fits in zoomMax (zoomMin) and if it's not — just align to the leftmost item.
We can't alter setRange or _applyRange, because of them it is a correct behavior. For example, if we try to modify checks in _applyRange we will break zooming.