Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide method to refresh edgePadding and gutter or allow clamp values #831

Open
nlighteneddesign opened this issue Aug 23, 2023 · 0 comments

Comments

@nlighteneddesign
Copy link

Issue description: There is no way to refresh gutter and edgepadding after build.

We have a complex calculation for edge and gutter in order to line up with content above that uses clamp settings. We've attempted the refresh method, but that does not recalculate the spacing.

This could be resolved if we could put clamp as the values instead of an integer as well.

NB in the demo below the positionInfo does calculate the correct value on refresh, but it does not translate to the gutter.

Demo link/slider setting:

this.carousel = tns({
      autoHeight: false,
      autoplay: false,
      center: true,
      container: this.lightDom.carousel,
      controlsContainer: this.dom.controls,
      edgePadding: this.getSpacing().edgePadding,
      gutter: this.getSpacing().gutter,
      items: 1,
      loop: false,
      mouseDrag: true,
      nav: false,
      slideBy: 1,
      onInit: (info) => {
        this.dom.numbersTotal.innerText = info.slideCount;
        this.positionInfo();
      },
    });

Tiny-slider version: 2.9.4
Browser name && version: Firefox 116.0.2
OS name && version: Ubuntu 22.04

@nlighteneddesign nlighteneddesign changed the title No way to refresh gutter and edge padding on responsive Please provide method to refresh edgePadding and gutter or allow clamp values Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant