Skip to content

Commit

Permalink
Minor fix for code accidentally removed in the past.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilton Janfield committed Sep 12, 2015
1 parent b4821b6 commit 60db5c9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions js/jquery.enhsplitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@

// If this is the first splitter, set up our events.
if (splitters.length == 0) {
$(window).on('resize.splitter', function () {
$(window)
.on('resize.splitter', function () {
$.each(splitters, function (i, splitter) {
splitter.refresh();
});
Expand Down Expand Up @@ -332,28 +333,25 @@
}

if (currentSplitter.settings.vertical) {
currentSplitter.setPosition(position - currentSplitter.offset().left);
currentSplitter.setPosition(position - currentSplitter.offset().left - currentSplitter.splitterSizeHalf);
} else {
currentSplitter.setPosition(position - currentSplitter.offset().top - currentSplitter.splitterSizeHalf);
}
e.preventDefault();
currentSplitter.settings.onDrag(e);
}
}
)
;
);
}

self.settings = settings;

// Initial position of the splitter itself.
// Set the initial position of the splitter.
self.setPosition(self.translatePosition(settings.position));

self.data('splitter', self);

splitters.push(self);
return self;
}
;
};
})
(jQuery);

0 comments on commit 60db5c9

Please sign in to comment.