Deal with minHeight option

pull/196/head
Nick Denry 4 years ago
parent a61c7198a3
commit 1fd1ee2a97

@ -256,7 +256,6 @@
.editor-preview-active-side--no-fullscreen {
height: auto;
position: static;
min-height: calc(300px + 22px);
float: right;
}

@ -2257,6 +2257,11 @@ EasyMDE.prototype.createSideBySide = function () {
if (!preview || !/editor-preview-side/.test(preview.className)) {
preview = document.createElement('div');
preview.className = 'editor-preview-side';
var optionsMinHeight = parseInt(this.options.minHeight);
var paddingTop = parseInt(window.getComputedStyle(wrapper).paddingTop);
var borderTopWidth = parseInt(window.getComputedStyle(wrapper).borderTopWidth);
var minHeight = optionsMinHeight + paddingTop * 2 + borderTopWidth * 2;
preview.style.minHeight = minHeight.toString() + 'px';
if (this.options.previewClass) {

Loading…
Cancel
Save