diff --git a/src/model/history.js b/src/model/history.js index f8598ae..ecc7fcc 100644 --- a/src/model/history.js +++ b/src/model/history.js @@ -119,6 +119,15 @@ NetVis.prototype._constructHistory = function() { } }; + self.history.prev = function() { + if (!self._selectedTimeInterval) { + return; + } + if (self._selectedTimeInterval.prev) { + self._selectedTimeInterval = self._selectedTimeInterval.prev; + } + }; + // add default time margin moments self.history.loadEvent({"tag":"end"},moment("3000-01-01")); self.history.loadEvent({"tag":"start"},moment("1970-01-01"));