style
This commit is contained in:
+10
-5
@@ -52,7 +52,7 @@
|
||||
n.innerHTML = '';
|
||||
n.appendChild(t);
|
||||
} else {
|
||||
n.innerHTML = t.replaceAll('\n','<br>');
|
||||
n.innerHTML = t.replaceAll('\n', '<br>');
|
||||
}
|
||||
};
|
||||
// detect isElement
|
||||
@@ -2564,7 +2564,7 @@
|
||||
}
|
||||
d.setAttribute('nodeid', node.id);
|
||||
d.style.visibility = 'hidden';
|
||||
this._reset_node_custom_style(d, node.data);
|
||||
this._reset_node_custom_style(node, d, node.data);
|
||||
|
||||
parent_node.appendChild(d);
|
||||
view_data.element = d;
|
||||
@@ -2826,10 +2826,10 @@
|
||||
},
|
||||
|
||||
reset_node_custom_style: function (node) {
|
||||
this._reset_node_custom_style(node._data.view.element, node.data);
|
||||
this._reset_node_custom_style(node, node._data.view.element, node.data);
|
||||
},
|
||||
|
||||
_reset_node_custom_style: function (node_element, node_data) {
|
||||
_reset_node_custom_style: function (node, node_element, node_data) {
|
||||
if ('background-color' in node_data) {
|
||||
node_element.style.backgroundColor = node_data['background-color'];
|
||||
}
|
||||
@@ -2842,8 +2842,13 @@
|
||||
if ('height' in node_data) {
|
||||
node_element.style.height = node_data['height'] + 'px';
|
||||
}
|
||||
if ('font-size' in node_data) {
|
||||
/*if ('font-size' in node_data) {
|
||||
node_element.style.fontSize = node_data['font-size'] + 'px';
|
||||
}*/
|
||||
if (node.isroot) {
|
||||
node_element.style.backgroundColor = '#289f45'
|
||||
} else {
|
||||
node_element.style.fontSize = '12px';
|
||||
}
|
||||
if ('font-weight' in node_data) {
|
||||
node_element.style.fontWeight = node_data['font-weight'];
|
||||
|
||||
Reference in New Issue
Block a user