<commit_before>﻿
$.fn.carouselify = function (options) {
    if (this.length == 0) return undefined;
    var settings = $.extend({
        autoScroll: false,
        autoScrollInterval: 2000,
        loop: false,
        settling: false,
        overScrolling: false,
        momentumScrolling: false,
        addDots: false,
        elementSelector: ".slideLink",
        listSelector: ".carouselList",
        slideMaxHeight: 315,
        slideMaxWidth: 480,
        maximizeSlideSize: true,
        leftButtonSelector: "",
        rightButtonSelector: "",
        elementPadding: 0,
        elementWrapper: ".slideWrapper"
    }, options);
    var object = this;
    if (settings.leftButtonSelector != "") {
        $(document).on("click", settings.leftButtonSelector, function(e) {
            e.preventDefault();
            carousel.AutoScroll.Stop();
            carousel.Slide("right");
            carousel.AutoScroll.Start();
        });
    }

    if (settings.rightButtonSelector != "") {
        $(document).on("click", settings.rightButtonSelector, function(e) {
            e.preventDefault();
            carousel.AutoScroll.Stop();
            carousel.Slide("left");
            carousel.AutoScroll.Start();
        });
    }

    var touchElement = settings.maximizeSlideSize == true ? settings.elementSelector : settings.elementSelector + ", " + settings.listSelector;
    this.on("touchstart mousedown", touchElement, function (e) {
        carousel.TouchStart(e);
    });

    this.on("touchmove mousemove", touchElement, function(e) {
        if (carousel.TouchStarted == true) {
            if (carousel.TouchMove(e) == true) {
                e.preventDefault();
            }
        }
    });

    this.on("touchend mouseup mouseleave", touchElement, function (e) {
        if (carousel.TouchStarted == true) {
            carousel.TouchFinish(e);
        }
    });

    this.on("click", settings.elementSelector, function(e) {
        if ($(this).attr("data-prevent-default") == "true") {
            e.preventDefault();
            e.stopImmediatePropagation();
        }
    });

    $(window).bind('orientationchange, resize', function () {
        carousel.Resize();
        carousel.HoldCurrentSlide();
    });

    //create banner objects with properties already loaded
    var banners = [];
    this.find(settings.elementSelector).each(function (i) {
        var banner = $(this);
		banner.css("display", "inline-block");
	    var bannerObject = {
		    Banner: banner,
		    Width: function() {
			    return parseInt(this.Banner.css("width").replace("px", ""));
		    },
		    Link: banner.attr("href"),
		    Id: i,
		    X: function() {
			    return -(this.Banner[0].offsetLeft - carousel.Head().Banner[0].offsetLeft);
		    },
		    Wrapper: banner.parent(settings.elementWrapper),
		    Dot: $(".carouselControl[data-id=" +i + "]"),
		    DotWrapper: $(".carouselControl[data-id=" +i + "]").parent("li")
		};
        banners.push(bannerObject);<commit_msg>add inline block to element wrapper<commit_after>﻿
$.fn.carouselify = function (options) {
    if (this.length == 0) return undefined;
    var settings = $.extend({
        autoScroll: false,
        autoScrollInterval: 2000,
        loop: false,
        settling: false,
        overScrolling: false,
        momentumScrolling: false,
        addDots: false,
        elementSelector: ".slideLink",
        listSelector: ".carouselList",
        slideMaxHeight: 315,
        slideMaxWidth: 480,
        maximizeSlideSize: true,
        leftButtonSelector: "",
        rightButtonSelector: "",
        elementPadding: 0,
        elementWrapper: ".slideWrapper"
    }, options);
    var object = this;
    if (settings.leftButtonSelector != "") {
        $(document).on("click", settings.leftButtonSelector, function(e) {
            e.preventDefault();
            carousel.AutoScroll.Stop();
            carousel.Slide("right");
            carousel.AutoScroll.Start();
        });
    }

    if (settings.rightButtonSelector != "") {
        $(document).on("click", settings.rightButtonSelector, function(e) {
            e.preventDefault();
            carousel.AutoScroll.Stop();
            carousel.Slide("left");
            carousel.AutoScroll.Start();
        });
    }

    var touchElement = settings.maximizeSlideSize == true ? settings.elementSelector : settings.elementSelector + ", " + settings.listSelector;
    this.on("touchstart mousedown", touchElement, function (e) {
        carousel.TouchStart(e);
    });

    this.on("touchmove mousemove", touchElement, function(e) {
        if (carousel.TouchStarted == true) {
            if (carousel.TouchMove(e) == true) {
                e.preventDefault();
            }
        }
    });

    this.on("touchend mouseup mouseleave", touchElement, function (e) {
        if (carousel.TouchStarted == true) {
            carousel.TouchFinish(e);
        }
    });

    this.on("click", settings.elementSelector, function(e) {
        if ($(this).attr("data-prevent-default") == "true") {
            e.preventDefault();
            e.stopImmediatePropagation();
        }
    });

    $(window).bind('orientationchange, resize', function () {
        carousel.Resize();
        carousel.HoldCurrentSlide();
    });

    //create banner objects with properties already loaded
    var banners = [];
    this.find(settings.elementSelector).each(function (i) {
        var banner = $(this);
	    var bannerObject = {
		    Banner: banner,
		    Width: function() {
			    return parseInt(this.Banner.css("width").replace("px", ""));
		    },
		    Link: banner.attr("href"),
		    Id: i,
		    X: function() {
			    return -(this.Banner[0].offsetLeft - carousel.Head().Banner[0].offsetLeft);
		    },
		    Wrapper: banner.parent(settings.elementWrapper),
		    Dot: $(".carouselControl[data-id=" +i + "]"),
		    DotWrapper: $(".carouselControl[data-id=" +i + "]").parent("li")
		};
		banner.css("display", "inline-block");
		banner.Wrapper.css("display", "inline-block");
        banners.push(bannerObject);
{'fraction_non_alphanumeric': 0.14883797593538817, 'fraction_numerical': 0.004615131036756222, 'mean_word_length': 2.3767390094602114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '939387', 'n_tokens_mistral': 1825, 'n_tokens_neox': 1707, 'n_words': 314}