From b31af224a6c54e1f6e658204ea20cea450e57b8e Mon Sep 17 00:00:00 2001 From: chenyang Date: Sat, 7 May 2022 12:20:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20=20auto=5Fheight=5Fnode=5F?= =?UTF-8?q?before=5Fupdate=EF=BC=8C=E9=A1=B5=E9=9D=A2=E4=BC=9A=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/jsmind.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/static/js/jsmind.js b/static/js/jsmind.js index 221e2ae..c21813d 100644 --- a/static/js/jsmind.js +++ b/static/js/jsmind.js @@ -1382,7 +1382,8 @@ this.view.show(false); this.view.reset_node_custom_style(node); this.expand_node(parent_node); - if (!stop_invoke_event) { /** by cy*/ + if (!stop_invoke_event) { + /** by cy*/ this.invoke_event_handle(jm.event_type.edit, { evt: 'add_node', data: [node.parent.id, nodeid, topic, data], @@ -1405,7 +1406,8 @@ this.view.add_node(node); this.layout.layout(); this.view.show(false); - if (!stop_invoke_event) { /** by cy*/ + if (!stop_invoke_event) { + /** by cy*/ this.invoke_event_handle(jm.event_type.edit, { evt: 'insert_node_before', data: [beforeid, nodeid, topic, data], @@ -1428,7 +1430,8 @@ this.view.add_node(node); this.layout.layout(); this.view.show(false); - if (!stop_invoke_event) { /** by cy*/ + if (!stop_invoke_event) { + /** by cy*/ this.invoke_event_handle(jm.event_type.edit, { evt: 'insert_node_after', data: [afterid, nodeid, topic, data], @@ -1467,7 +1470,8 @@ this.layout.layout(); this.view.show(false); this.view.restore_location(parent_node); - if (!stop_invoke_event) { /** by cy*/ + if (!stop_invoke_event) { + /** by cy*/ this.invoke_event_handle(jm.event_type.edit, {evt: 'remove_node', data: [nodeid], node: parentid}); } return true; @@ -1492,16 +1496,14 @@ } node.topic = topic; - // by cy - this.auto_height_node_before_update(node) - this.view.update_node(node); this.layout.layout(); this.view.show(false); - if (!stop_invoke_event) { /** by cy*/ + if (!stop_invoke_event) { + /** by cy*/ this.invoke_event_handle(jm.event_type.edit, { evt: 'update_node', data: [nodeid, topic],