diff --git a/HISTORY.md b/HISTORY.md
index 4cf60751..4b203627 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -6,6 +6,9 @@ http://visjs.org
### Timeline
+- Select event now triggers repeatedly when selecting an already selected item.
+- Renamed `Timeline.repaint()` to `Timeline.redraw()` to be consistent with
+ the other visualisations of vis.js.
- Fixed `Timeline.clear()` not resetting a configured `options.start` and
`options.end`.
diff --git a/docs/timeline.html b/docs/timeline.html
index 74445571..179d11a1 100644
--- a/docs/timeline.html
+++ b/docs/timeline.html
@@ -692,9 +692,9 @@ timeline.clear({options: true}); // clear options only
- repaint() |
+ redraw() |
none |
- Force a repaint of the Timeline. Can be useful to manually repaint when option autoResize=false.
+ | Force a redraw of the Timeline. Can be useful to manually redraw when option autoResize=false.
|
diff --git a/src/timeline/Timeline.js b/src/timeline/Timeline.js
index 961484dd..c362aa6c 100644
--- a/src/timeline/Timeline.js
+++ b/src/timeline/Timeline.js
@@ -602,13 +602,18 @@ Timeline.prototype.getWindow = function setWindow() {
};
/**
- * Force a repaint of the Timeline. Can be useful to manually repaint when
+ * Force a redraw of the Timeline. Can be useful to manually redraw when
* option autoResize=false
*/
-Timeline.prototype.repaint = function repaint() {
+Timeline.prototype.redraw = function redraw() {
this.rootPanel.repaint();
};
+// TODO: deprecated since version 1.1.0, remove some day
+Timeline.prototype.repaint = function repaint() {
+ throw new Error('Function repaint is deprecated. Use redraw instead.');
+};
+
/**
* Handle selecting/deselecting an item when tapping it
* @param {Event} event
@@ -693,7 +698,7 @@ Timeline.prototype._onAddItem = function (event) {
this.options.onAdd(newItem, function (item) {
if (item) {
me.itemsData.add(newItem);
- // TODO: need to trigger a repaint?
+ // TODO: need to trigger a redraw?
}
});
}