|
|
|
@ -388,11 +388,18 @@ define([
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// add the splitter
|
|
|
|
|
if (!$iframe.has('.cp-splitter').length) {
|
|
|
|
|
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;
|
|
|
|
@ -406,6 +413,7 @@ define([
|
|
|
|
|
$target.css('width', (w - x + evt.pageX) + 'px');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Cryptpad.removeLoadingScreen();
|
|
|
|
|
setEditable(true);
|
|
|
|
|