selectNodesById method
This method is used to select nodes by their IDs.
Emits a NodeSelectionEvent event.
Implementation
void selectNodesById(
Set<String> ids, {
bool holdSelection = false,
bool isHandled = false,
}) async {
if (ids.isEmpty) {
return clearSelection();
} else if (!holdSelection) {
clearSelection();
}
selectedNodeIds.addAll(ids);
for (final id in selectedNodeIds) {
final node = nodes[id];
node?.state.isSelected = true;
}
// eventBus.emit(
// SelectionEvent(id: const Uuid().v4(), selectedNodeIds.toSet()),
// );
}