From da4252c6dac53ec78a1e7bd041ee7226d120121d Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 28 Dec 2024 12:10:27 +0100 Subject: [PATCH] clone: avoid some unnecessary property checks --- CHANGELOG.md | 1 + src/client/widgets/containers/clone.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 375db8e7..5110013c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - multixy: `default` not applied when points are named + - clone: avoid some unnecessary property checks - client - show 3-dots menu in read-only mode with access to allowed items (e.g fullscreen) diff --git a/src/client/widgets/containers/clone.js b/src/client/widgets/containers/clone.js index e012744e..6e5a9cff 100644 --- a/src/client/widgets/containers/clone.js +++ b/src/client/widgets/containers/clone.js @@ -96,8 +96,12 @@ class Clone extends Container() { }, {context: this}) widgetManager.on('prop-changed', (e)=>{ + // watch for prop changes initiated by the editor + // Other changes (from advanced syntaxes) are already + // handled by standard widget mechanicsé if (!this.cloneTarget) return + if (!e.options.fromEditor) return if (e.widget === this.cloneTarget || this.cloneTarget.contains(e.widget)) {