This commit is contained in:
aqu415
2022-02-15 21:59:50 +08:00
parent 1be792b38b
commit 01539916d6
3 changed files with 10 additions and 7 deletions
+5 -5
View File
@@ -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;
}
+2 -2
View File
@@ -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
}