@preference-sl/pref-viewer 2.14.0-beta.3 → 2.14.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/pref-viewer.js +11 -3
package/package.json
CHANGED
package/src/pref-viewer.js
CHANGED
|
@@ -302,14 +302,22 @@ export default class PrefViewer extends HTMLElement {
|
|
|
302
302
|
if (this.#menu3D) {
|
|
303
303
|
this.#menu3D.removeEventListener("pref-viewer-menu-3d-apply", this.#handlers.onMenuApply);
|
|
304
304
|
this.#menu3D.remove();
|
|
305
|
+
this.#menu3D = null;
|
|
305
306
|
}
|
|
306
|
-
|
|
307
|
+
if (this.#handlers.onViewerHoverStart) {
|
|
308
|
+
this.#wrapper.removeEventListener("mouseenter", this.#handlers.onViewerHoverStart);
|
|
309
|
+
this.#handlers.onViewerHoverStart = null;
|
|
310
|
+
}
|
|
311
|
+
if (this.#handlers.onViewerHoverEnd) {
|
|
312
|
+
this.#wrapper.removeEventListener("mouseleave", this.#handlers.onViewerHoverEnd);
|
|
313
|
+
this.#handlers.onViewerHoverEnd = null;
|
|
314
|
+
}
|
|
315
|
+
|
|
307
316
|
// Check if menu should be shown (default: true if not specified)
|
|
308
317
|
const showMenuAttr = this.getAttribute("show-menu");
|
|
309
318
|
const showMenu = showMenuAttr === null || showMenuAttr === "true";
|
|
310
|
-
|
|
319
|
+
|
|
311
320
|
if (!showMenu) {
|
|
312
|
-
this.#menu3D = null;
|
|
313
321
|
return;
|
|
314
322
|
}
|
|
315
323
|
|