Fixing default values so they are easier to overwrite with extend
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user