Skip to content

drag-and-drop metadata: Support coloring merging #2031

@joverlee521

Description

@joverlee521

Allow drag-and-drop metadata to merge with existing metadata for fields that are used as coloring

/* restrict added colorings to those _not_ currently present on the tree. This could be relaxed. TODO. */
for (const colorName of Object.keys(newColorings)) {
if (controls.coloringsPresentOnTree.has(colorName)) {
droppedColorings.add(colorName);
delete newColorings[colorName];
}
}
/* strip those droppedColorings out of `newNodeAttrs` */
for (const colorName of droppedColorings) {
for (const nodeAttr of Object.values(newNodeAttrs)) {
delete nodeAttr[colorName]; // Note that this works even if `colorName` is not a property
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions