From 5750163db787e45eb25fc974dcbefb713660ccce Mon Sep 17 00:00:00 2001 From: "pawel.gaca" Date: Thu, 15 Jan 2026 08:50:19 +0100 Subject: [PATCH] Wyrzucenie init z konstruktora --- README.md | 4 +++- klasa.js | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c400f8a..ae09ebe 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Warto gdzieś później zapisać nową nazwę klasy np w opisie komponentu, albo ### Przykłady UŻYCIA ### ##### Jedna ramka - obiekt ###### ``` -new IdmHotspot({ +const hotspot = new IdmHotspot({ id: "idmTestHotspot1", title: "tescik", placement: { @@ -78,6 +78,8 @@ new IdmHotspot({ callbackFn: (hotspot)=>{console.log(hotspot)}, } }); + +hotspot.init(); ``` diff --git a/klasa.js b/klasa.js index a673cad..b3e2e41 100644 --- a/klasa.js +++ b/klasa.js @@ -612,7 +612,6 @@ class IdmHotspot { this.handleHideSecondImage = this.handleHideSecondImage.bind(this); this.handleSelectVersion = this.handleSelectVersion.bind(this); this.handleSelectSize = this.handleSelectSize.bind(this); - this.init(); } // ======================================================== @@ -1421,7 +1420,6 @@ class IdmHotspot { }/settings.html?comparers=add&product=${compareId}`; const res = await fetch(compareUrl); - console.log(res); if (!res.ok) throw new Error(`${idmHotspotTextObject["Wystąpił błąd"]}`); compareBtnEl.classList.add("--success"); @@ -2390,7 +2388,6 @@ class IdmHotspot { app_shop.run( () => { this.init(); - console.log("test", this.hotspotEl); }, "all", "#Basket",