Skip to content

Commit

Permalink
Merge pull request #3 from metrica-sports/fran/redraw-with-dirty-flags
Browse files Browse the repository at this point in the history
Redraw with dirty flags
  • Loading branch information
FranCarrascosaMS authored Jul 3, 2023
2 parents 16fa0d3 + ed30ba8 commit 043e326
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lib/timeline/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,13 @@ export default class Timeline extends Core {
* Can be useful to manually redraw when option autoResize=false and the window
* has been resized, or when the items CSS has been changed.
*
* Note: this function will be overridden on construction with a trottled version
* @param {boolean} refreshItems
* @param {boolean} restackGroups
*
* Note: this function will be overridden on construction with a throttled version
*/
redraw() {
this.itemSet && this.itemSet.markDirty({refreshItems: true});
redraw(refreshItems = true, restackGroups = false) {
this.itemSet && this.itemSet.markDirty({refreshItems, restackGroups});
this._redraw();
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metrica-sports/vis-timeline",
"version": "1.1.0",
"version": "1.2.0",
"description": "Create a fully customizable, interactive timeline with items and ranges.",
"homepage": "https://visjs.github.io/vis-timeline/",
"license": "(Apache-2.0 OR MIT)",
Expand Down Expand Up @@ -126,6 +126,7 @@
"Martin Fischer <Arthur.Spooner@gmail.com>",
"Brad Hards <bradh@frogmouth.net>",
"Chris Jackson <chris@cd-jackson.com>",
"Fran Carrascosa <fran@metrica-sports.com>",
"Lewis B <lewisjb@users.noreply.github.com>",
"Brendon Page <brendon.page@chillisoft.co.za>",
"Manuel Schallar <manuel.schallar@iaik.tugraz.at>",
Expand Down Expand Up @@ -156,7 +157,6 @@
"Eric Kitaif <eric.kitaif@gmail.com>",
"David Anderson <eymiha@gmail.com>",
"fabriziofortino <fabrizio.fortino@gmail.com>",
"Fran Carrascosa <fran@metrica-sports.com>",
"Graham J <grahamj@users.noreply.github.com>",
"Mike Pilone <mpilone@npr.org>",
"Oleg Yapparov <oleg.yapparov@gmail.com>",
Expand Down

0 comments on commit 043e326

Please sign in to comment.