Autoheight does not calculate height according to slide content height

lucasfbustamante's Avatar

lucasfbustamante

07 Jul, 2018 10:12 PM

I'm facing an issue with autoheight, where it isn't calculating it correctly:
Autoheight not working

HTML:

<div id="rsBairro">
    <div class="rsTextSlide slide">
        <h3>Slider 1</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quibusdam fugit et recusandae nihil eum, ullam, doloribus dolorum expedita temporibus quisquam consequatur quod quidem officia nulla laudantium ipsum quasi vero debitis!</p>
    </div>
    <div class="rsTextSlide slide">
        <h3>Slider 2</h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quibusdam fugit et recusandae nihil eum, ullam, doloribus dolorum expedita temporibus quisquam consequatur quod quidem officia nulla laudantium ipsum quasi vero debitis!</p>
    </div>
</div>
Javascript:
$("#rsBairro").royalSlider({
    autoHeight: true,
    slidesOrientation: 'vertical',
    arrowsNav:true,
    arrowsNavAutoHide: true,
    arrowsNavHideOnTouch: true,
    keyboardNavEnabled: true,
    navigateByClick: true,
    controlNavigation: 'none',
    fadeinLoadedSlide: true,
    globalCaption: true,
    globalCaptionInside: false,
    addActiveClass: true,
});

If I use autoScaleSlider:true instead, it kinda works, but it leaves a big whitespace:
AutoScaleSlider works, but leave a whitespace

I would like it to set the height of the div according to the height of the content of the slider.

Thanks

  1. lucasfbustamante closed this discussion on 07 Jul, 2018 10:13 PM.

  2. lucasfbustamante re-opened this discussion on 07 Jul, 2018 10:14 PM

  3. 1 Posted by lucasfbustamant... on 07 Jul, 2018 10:14 PM

    lucasfbustamante's Avatar

    Re-opening this, as I miss-clicked the "resolved" option upon creating the topic.

  4. Support Staff 2 Posted by Dmitry Semenov on 08 Jul, 2018 05:19 AM

    Dmitry Semenov's Avatar

    Hello,

    autoHeight module does not support vertical navigation http://jsfiddle.net/2pays9nj/

    To make it work with vertical transition type - you'll need to manually force height of the slider each time slide changes, however, there are big performance implications since height and position of all slides has to be recalculated. So I wouldn't recommend.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac