make splitter work when scrolling

pull/1/head
Pierre Bondoerffer 7 years ago
parent edad5deeac
commit 4026994310
No known key found for this signature in database
GPG Key ID: C0C7C0C5063F2236

@ -388,11 +388,17 @@ define([
});
// add the splitter
var $preview = $iframe.find('#previewContainer');
var splitter = $('<div>', {
'class': 'cp-splitter'
}).appendTo($iframe.find('#previewContainer'));
}).appendTo($preview);
$preview.on('scroll', function() {
splitter.css('top', $preview.scrollTop() + 'px');
});
var $target = $iframe.find('.CodeMirror');
splitter.on('mousedown', function (e) {
e.preventDefault();
var x = e.pageX;

Loading…
Cancel
Save