diff --git a/lib/network/modules/NodesHandler.js b/lib/network/modules/NodesHandler.js index ecd6506085..5cc04f0ad4 100644 --- a/lib/network/modules/NodesHandler.js +++ b/lib/network/modules/NodesHandler.js @@ -482,13 +482,12 @@ class NodesHandler { const dataset = this.body.data.nodes.getDataSet(); for (const dsNode of dataset.get()) { - const id = dsNode.id; const bodyNode = this.body.nodes[id]; const x = Math.round(bodyNode.x); const y = Math.round(bodyNode.y); if (dsNode.x !== x || dsNode.y !== y) { - dataArray.push({ id, x, y }); + dataArray.push({ ...dsNode, x, y }); } } diff --git a/lib/network/modules/components/Node.js b/lib/network/modules/components/Node.js index 89e28d4f40..c508aee209 100644 --- a/lib/network/modules/components/Node.js +++ b/lib/network/modules/components/Node.js @@ -323,7 +323,7 @@ class Node { (p) => newOptions[p] != null ); // Always skip merging group font options into parent; these are required to be distinct for labels - skipProperties.push("font"); + skipProperties.push(["font"]); selectiveNotDeepExtend(skipProperties, parentOptions, groupObj); // the color object needs to be completely defined.