Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent reset the node color to the group color from storePositions function #1691

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/network/modules/NodesHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/network/modules/components/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down