selectSpecificNodes method
Selects only the specified nodes, clearing any existing selection.
This is similar to selectNodes but always clears the existing selection first.
Parameters:
nodeIds: List of node IDs to select
Example:
controller.selectSpecificNodes(['node1', 'node2']);
Implementation
void selectSpecificNodes(List<String> nodeIds) {
runInAction(() {
// Clear current selection
for (final node in _nodes.values) {
node.selected.value = false;
}
_selectedNodeIds.clear();
// Select specified nodes
for (final nodeId in nodeIds) {
final node = _nodes[nodeId];
if (node != null) {
_selectedNodeIds.add(nodeId);
node.selected.value = true;
}
}
});
}