<commit_before>(function($, window, document, undefined){

	var Splitster = function(el, options)
	{
		var self = this;
        var $el = $(el);

        // Setup instance
        self.el = el;
        self.opts = $.extend( {}, $.fn.splitster.defaults, options );

        // Initialize
        self._init();

        // Return configures component
        return self;
	}

	Splitster.prototype = {

		// Private methods
		_init: function()
		{
			var self = this;
			var $el = $(self.el);

			// Setup markup
			$el.addClass("splitster").addClass("splitster--" + self.opts.orientation);
			$el.find("> *").addClass("splitster__pane");
			$el.find("> *:first-child").after("<div class='splitster__bar' style='width:" + self.opts.barWidth + "px;height:" + self.opts.barWidth + "px;' />");

			self.pane1 = $el.find("> .splitster__pane:first-child").get(0);
			self.pane2 = $el.find("> .splitster__pane:last-child").get(0);
			self.bar = $el.find("> .splitster__bar").get(0);

			var dragOpts = self._getDraggableOptions();

			$(self.bar).draggable(dragOpts);

			if(self.opts.draggable)
				$(self.opts.draggable).draggable(dragOpts).addClass("splitster__draggable");

			self._updateSplit();

			$(window).on("resize.splitster", function(){
				self._updateSplit();
			});
		},

		_getDraggableOptions: function()
		{
			var self = this;
			var $el = $(self.el);

			return {
				helper: "clone",
				containment: ".splitster",
				appendTo: ".splitster",
				axis: self.opts.orientation == "vertical" ? "x" : "y",
				start: function(e, ui)
				{
					$(ui.helper).addClass("splitster__bar--ghost").empty();
				},
				stop: function(e, ui)
				{
					// Recalculate the split
					if(self.opts.orientation == "vertical")
					{
						var elWidth = $el.width();
						var offset = ui.position.left + (self.opts.barWidth / 2);
						self.opts.splitPos = (100 / elWidth) * offset;<commit_msg>Fixes #53 by preventing sidebar dragging if clicking on an icon<commit_after>(function($, window, document, undefined){

	var Splitster = function(el, options)
	{
		var self = this;
        var $el = $(el);

        // Setup instance
        self.el = el;
        self.opts = $.extend( {}, $.fn.splitster.defaults, options );

        // Initialize
        self._init();

        // Return configures component
        return self;
	}

	Splitster.prototype = {

		// Private methods
		_init: function()
		{
			var self = this;
			var $el = $(self.el);

			// Setup markup
			$el.addClass("splitster").addClass("splitster--" + self.opts.orientation);
			$el.find("> *").addClass("splitster__pane");
			$el.find("> *:first-child").after("<div class='splitster__bar' style='width:" + self.opts.barWidth + "px;height:" + self.opts.barWidth + "px;' />");

			self.pane1 = $el.find("> .splitster__pane:first-child").get(0);
			self.pane2 = $el.find("> .splitster__pane:last-child").get(0);
			self.bar = $el.find("> .splitster__bar").get(0);

			var dragOpts = self._getDraggableOptions();

			$(self.bar).draggable(dragOpts);

			if(self.opts.draggable){
				$(self.opts.draggable).draggable(dragOpts).addClass("splitster__draggable");
			}

			self._updateSplit();

			$(window).on("resize.splitster", function(){
				self._updateSplit();
			});
		},

		_getDraggableOptions: function()
		{
			var self = this;
			var $el = $(self.el);

			return {
				helper: "clone",
				containment: ".splitster",
				appendTo: ".splitster",
				axis: self.opts.orientation == "vertical" ? "x" : "y",
				cancel: "a",
				start: function(e, ui)
				{
					$(ui.helper).addClass("splitster__bar--ghost").empty();
				},
				stop: function(e, ui)
				{
					// Recalculate the split
					if(self.opts.orientation == "vertical")
					{
						var elWidth = $el.width();
						var offset = ui.position.left + (self.opts.barWidth / 2);
						self.opts.splitPos = (100 / elWidth) * offset;
{'fraction_non_alphanumeric': 0.18434016074669432, 'fraction_numerical': 0.005185377236193933, 'mean_word_length': 2.893037336024218, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '1184735', 'n_tokens_mistral': 1559, 'n_tokens_neox': 1293, 'n_words': 245}