Browse Source

bugfix slider

bugfix/microsites
Florian Eisenmenger 2 years ago
parent
commit
4b385852e2
2 changed files with 8 additions and 2 deletions
  1. +2
    -1
      gfi-ihk-2024/stories/sections/event-teaser-large-slider/EventTeaserLargeSliderComponent.js
  2. +6
    -1
      gfi-ihk-2024/stories/sections/slider/slider.js

+ 2
- 1
gfi-ihk-2024/stories/sections/event-teaser-large-slider/EventTeaserLargeSliderComponent.js View File

@@ -51,10 +51,11 @@ export const createETLSlider =
} }
if (moreCta) { if (moreCta) {
detailBox.appendChild(createButton({ detailBox.appendChild(createButton({
elementType: 'span',
label: moreCta.label, label: moreCta.label,
link: slideData.link,
color: 'primary', color: 'primary',
size: 'small', size: 'small',
preventClick: false
})) }))
} }
if (slideData.bgimage && slideData.bgimage .length > 0) { if (slideData.bgimage && slideData.bgimage .length > 0) {


+ 6
- 1
gfi-ihk-2024/stories/sections/slider/slider.js View File

@@ -334,6 +334,8 @@ class IHKSlider {


hammer.on('panstart', (e) => { hammer.on('panstart', (e) => {
sliderWidth = this.slideOverflow.width(); sliderWidth = this.slideOverflow.width();
// Disable click on drag
this.slideWrapper.find('a').css('pointer-events', 'none');


this.dragging = true; this.dragging = true;
startValue = this.slideWrapper.position().left; startValue = this.slideWrapper.position().left;
@@ -357,6 +359,7 @@ class IHKSlider {
}); });


hammer.on('panend', (e) => { hammer.on('panend', (e) => {
this.slideWrapper.find('a').addClass('dragging');
this.dragging = false; this.dragging = false;


requestAnimationFrame(() => { requestAnimationFrame(() => {
@@ -368,7 +371,9 @@ class IHKSlider {
} else { } else {
this.changeSlide(this.currentSlide); this.changeSlide(this.currentSlide);
} }
})
});
// Enable click on drag
this.slideWrapper.find('a').css('pointer-events', 'all');
}); });
} }




Loading…
Cancel
Save