diff --git a/static/html/detail.html b/static/html/detail.html index 2dce211..7016902 100644 --- a/static/html/detail.html +++ b/static/html/detail.html @@ -75,6 +75,9 @@ {target: 'showAll', text: '展开全部节点'}, {target: 'hideAll', text: '收起全部节点'} ] + }, + view: { + engine: 'svg' // 思维导图各节点之间线条的绘制引擎 } } diff --git a/static/js/jsmind.js b/static/js/jsmind.js index 9b51b3f..61fcd71 100644 --- a/static/js/jsmind.js +++ b/static/js/jsmind.js @@ -1508,13 +1508,11 @@ auto_height_node_before_update: function (node) { const topic = node.topic if (!!topic) { - const length = topic.length - const lines = length / 40 - + const lines = topic.split('\n').length const view_data = node._data.view; const element = view_data.element; - - element.style.height = '100px' + const height = (lines * 12 + 20) + element.style.height = `${height}px` } }, @@ -2419,6 +2417,7 @@ this.e_panel.appendChild(this.e_nodes); this.e_editor.className = 'jsmind-editor'; + this.e_editor.style.fontSize = '11px'; // this.e_editor.type = 'text'; this.actualZoom = 1; @@ -2552,6 +2551,7 @@ $t(d_e, '-'); d_e.setAttribute('nodeid', node.id); d_e.style.visibility = 'hidden'; + d.style.minWidth = '70px' parent_node.appendChild(d_e); view_data.expander = d_e; } diff --git a/static/js/jsmind.menu.js b/static/js/jsmind.menu.js index 08d2ed5..716217b 100644 --- a/static/js/jsmind.menu.js +++ b/static/js/jsmind.menu.js @@ -206,13 +206,13 @@ defaultFn.call(_this, this.selected_node) if (!_this._get_mid_opts()) { cb(this.selected_node, _noop) - fn.call(j, Jm.util.uuid.newid(), this.menuOpts.newNodeText || '请输入节点名称') + fn.call(j, Jm.util.uuid.newid(), this.menuOpts.newNodeText || '请输入名称') return } cb(this.selected_node, _this._mid_stage_next(function () { var retArgs = [this.selected_node] var argus = Array.prototype.slice.call(arguments[0], 0) - argus[1] = this.menuOpts.newNodeText || '请输入节点名称' + argus[1] = this.menuOpts.newNodeText || '请输入名称' if (argus[0]) { retArgs = argus }