From cc2c72add80ac1fc9a209d2db8371f826d77b703 Mon Sep 17 00:00:00 2001 From: Peter Bucher Date: Tue, 30 Mar 2021 14:01:06 +0200 Subject: [PATCH] added forceUpdate parameter to update canvasView function --- AUTHORS.md | 1 + src/view/CanvasView.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index d8cb5a3a4c..5903c65fb0 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -15,3 +15,4 @@ - Scott Kieronski - Samuel Asensi - Takahiro Nishino +- Peter Bucher diff --git a/src/view/CanvasView.js b/src/view/CanvasView.js index cabb135938..9533993cac 100644 --- a/src/view/CanvasView.js +++ b/src/view/CanvasView.js @@ -131,10 +131,11 @@ var CanvasView = View.extend(/** @lends CanvasView# */{ * event handlers for interaction, animation and load events, this method is * invoked for you automatically at the end. * + * @param {Boolean} {forceUpdate} force the view to update * @return {Boolean} {@true if the view was updated} */ - update: function() { - if (!this._needsUpdate) + update: function(forceUpdate) { + if (!this._needsUpdate && !forceUpdate ) return false; var project = this._project, ctx = this._context,