Skip to content

Commit

Permalink
History.prev to jump one time interval back
Browse files Browse the repository at this point in the history
  • Loading branch information
dborzov committed Jan 21, 2015
1 parent 5121ee1 commit bfdc504
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/model/history.js
Expand Up @@ -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"));
Expand Down

0 comments on commit bfdc504

Please sign in to comment.