From 0b34186ca408a9e7bd93cb4013e7fed6926fecea Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Fri, 10 Feb 2023 09:32:25 +0100 Subject: [PATCH] fixed static clone --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 65a848d..87a9cb2 100644 --- a/index.html +++ b/index.html @@ -2359,9 +2359,11 @@ AFRAME.registerComponent('dynamic-unless-picked', { let el = this.el el.setAttribute('dynamic-body', "") this.el.addEventListener('picked', function (event) { + el.removeAttribute('dynamic-body') el.setAttribute('static-body', "") }) this.el.addEventListener('released', function (event) { + el.removeAttribute('static-body') el.setAttribute('dynamic-body', "") }) }