Fixing default values so they are easier to overwrite with extend

This commit is contained in:
2026-01-13 14:56:11 +01:00
parent 8fadf8c07d
commit db789a23f9
3 changed files with 1566 additions and 1031 deletions

1403
klasa.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,10 @@
IdmHotspot = class extends IdmHotspot { IdmHotspot = class extends IdmHotspot {
getDefaultHotspotOptions() {
const defaultOptions = super.getDefaultHotspotOptions();
defaultOptions.cssVariables.nameClamp = 2;
return defaultOptions;
}
markupLabel(prod) { markupLabel(prod) {
// Standardowe labelki // Standardowe labelki
let labelMarkup = super.markupLabel(prod); let labelMarkup = super.markupLabel(prod);
@@ -6,11 +12,13 @@ IdmHotspot = class extends IdmHotspot {
// Customowe labelki // Customowe labelki
const awards = prod?.awardedParameters; const awards = prod?.awardedParameters;
if (awards?.length) { if (awards?.length) {
const awardParam = awards.find(award => award.name === "Idm_custom_label"); const awardParam = awards.find(
const values = awardParam?.values?.map(v => v.name) || []; (award) => award.name === "Idm_custom_label"
);
const values = awardParam?.values?.map((v) => v.name) || [];
const html = values const html = values
.map(label => { .map((label) => {
const [text, bgColor, color] = label.split("||"); const [text, bgColor, color] = label.split("||");
return `<span class="label --custom" style="background-color:${bgColor}; color:${color}">${text}</span>`; return `<span class="label --custom" style="background-color:${bgColor}; color:${color}">${text}</span>`;
}) })
@@ -21,4 +29,4 @@ IdmHotspot = class extends IdmHotspot {
return labelMarkup; return labelMarkup;
} }
} };

View File

@@ -1,7 +1,7 @@
bug - ramka nie działa dla banneru slider-1 itp bug - ramka nie działa dla banneru slider-1 itp
problem z funkcją new HotspotSlider i tym że orzekuje tam hotspotów idosellowych!!!! problem z funkcją new HotspotSlider i tym że orzekuje tam hotspotów idosellowych!!!!
- przeliczanie ceny
- sprawdzenie zdjęcia producenta - sprawdzenie zdjęcia producenta
- Wykluczenie powtarzających się wersji - Wykluczenie powtarzających się wersji
- dodanie efektu 3d - dodanie efektu 3d