Magento – Fotorama gallery multiple breakpoints

fotoramafotorama-slidermagento2

When the breakpoint is single everything works fine, when I try to add one more breakpoint, it doesn't work. Here is my code from view.xml.
So firstly I need to display nav as vertical thumbs, next break as horizontal and last as dots.

enter image description here

Best Answer

Try this Solution working fine for me change code in XML file your-theme/etc/view.xml

<var name="breakpoints">
<var name="mobile">
    <var name="conditions">
        <var name="max-width">767px</var>
    </var>
    <var name="options">
        <var name="options">
            <var name="nav">dots</var>
        </var>
    </var>
</var>
<var name="tablet">
    <var name="conditions">
        <var name="min-width">768px</var>
        <var name="max-width">900px</var>
    </var>
    <var name="options">
        <var name="options">
            <var name="navdir">horizontal</var>
        </var>
    </var>
</var>

and also change the line in your-theme/web/mage/gallery/gallery.js

settings.api.updateOptions(settings.defaultConfig.options, true); 

to

if(window.innerWidth > 767) {
                                settings.api.updateOptions(settings.defaultConfig.options, true);
                            }
Related Topic