Fix the splitter in code and add it back

pull/1/head
yflory 7 years ago
parent 018f71df04
commit 0a656ca8d6

@ -437,35 +437,35 @@ define([
});
/*
// add the splitter
if (!$iframe.has('.cp-splitter').length) {
var $preview = $iframe.find('#previewContainer');
if (!$('.cp-splitter').length) {
var splitter = $('<div>', {
'class': 'cp-splitter'
}).appendTo($preview);
}).appendTo($previewContainer);
$preview.on('scroll', function() {
splitter.css('top', $preview.scrollTop() + 'px');
});
var $target = $iframe.find('.CodeMirror');
var $target = $('.CodeMirror');
splitter.on('mousedown', function (e) {
e.preventDefault();
var x = e.pageX;
var w = $target.width();
$iframe.on('mouseup mousemove', function handler(evt) {
$(window).on('mouseup mousemove', function handler(evt) {
if (evt.type === 'mouseup') {
$iframe.off('mouseup mousemove', handler);
$(window).off('mouseup mousemove', handler);
return;
}
$target.css('width', (w - x + evt.pageX) + 'px');
editor.refresh();
});
});
}
*/
Cryptpad.removeLoadingScreen();
setEditable(!readOnly);

Loading…
Cancel
Save