fix fitToContent when applies-to is taller than window
This commit is contained in:
parent
001b8c6166
commit
184b6d4f7c
|
@ -160,7 +160,8 @@ function SectionsEditor() {
|
|||
contentHeight += 9; // border & resize grip
|
||||
cm.off('update', resize);
|
||||
const cmHeight = wrapper.offsetHeight;
|
||||
const maxHeight = (window.innerHeight - headerOffset) - (section.el.offsetHeight - cmHeight);
|
||||
const appliesToHeight = Math.min(section.el.offsetHeight - cmHeight, window.innerHeight / 2);
|
||||
const maxHeight = (window.innerHeight - headerOffset) - appliesToHeight;
|
||||
const fit = Math.min(contentHeight, maxHeight);
|
||||
if (Math.abs(fit - cmHeight) > 1) {
|
||||
cm.setSize(null, fit);
|
||||
|
|
Loading…
Reference in New Issue
Block a user