From 49a38f1771bd012de5f822088fc273078f8e0cd0 Mon Sep 17 00:00:00 2001 From: Futahei Date: Wed, 22 Feb 2023 12:30:30 +0900 Subject: [PATCH] fix --- src/figni-viewer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/figni-viewer.js b/src/figni-viewer.js index ef1feeb..c2ff5fe 100644 --- a/src/figni-viewer.js +++ b/src/figni-viewer.js @@ -232,7 +232,9 @@ export default class FigniViewerElement extends HTMLElement { }) observer.observe(this, { childList: true }) this.querySelectorAll('[slot^="hotspot-"]').forEach((hotspot) => { - this.#hotspots.push(this.appendChild(hotspot)) + if (hotspot.parentNode !== this.base) { + this.#hotspots.push(this.appendChild(hotspot)) + } }) this.addEventListener('load', () => { setTimeout(() => {