All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.isotope._includes.layout-change.js Maven / Gradle / Ivy

There is a newer version: 1.2.0.3-jre17-rc1
Show newest version
// change layout
var isHorizontal = false;

function changeLayoutMode($link, options) {
    var wasHorizontal = isHorizontal;
    isHorizontal = $link.hasClass('horizontal');

    if (wasHorizontal !== isHorizontal) {
        // orientation change
        // need to do some clean up for transitions and sizes
        var style = isHorizontal ?
            {height: '80%', width: $container.width()} :
            {width: 'auto'};
        // stop any animation on container height / width
        $container.filter(':animated').stop();
        // disable transition, apply revised style
        $container.addClass('no-transition').css(style);
        setTimeout(function () {
            $container.removeClass('no-transition').isotope(options);
        }, 100)
    } else {
        $container.isotope(options);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy