From dc5442713db6ed110d2d54d7f1c27342c16e0834 Mon Sep 17 00:00:00 2001 From: aqu415 Date: Sun, 6 Mar 2022 09:47:24 +0800 Subject: [PATCH] update --- static/js/jsmind.js | 2 +- static/js/jsmind.menu.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/jsmind.js b/static/js/jsmind.js index 095c0b6..821d05c 100644 --- a/static/js/jsmind.js +++ b/static/js/jsmind.js @@ -1519,7 +1519,7 @@ const lines = topic.split('\n').length const view_data = node._data.view; const element = view_data.element; - const height = (lines * 12 + 20) + const height = (lines * 12 + 14) element.style.height = `${height}px` } }, diff --git a/static/js/jsmind.menu.js b/static/js/jsmind.menu.js index 716217b..0384ad5 100644 --- a/static/js/jsmind.menu.js +++ b/static/js/jsmind.menu.js @@ -365,6 +365,7 @@ var ncs = getComputedStyle(element) scope.e_editor.value = topic scope.e_editor.style.width = (element.clientWidth - parseInt(ncs.getPropertyValue('padding-left')) - parseInt(ncs.getPropertyValue('padding-right'))) + 'px' + scope.e_editor.style.height = (element.clientHeight - parseInt(ncs.getPropertyValue('padding-top')) - parseInt(ncs.getPropertyValue('padding-bottom'))) + 'px' element.innerHTML = '' element.appendChild(scope.e_editor) element.style.zIndex = 5