{
+ const elements = document.getElementsByClassName(`${nodeType}-node`) as HTMLCollectionOf
+ //get the greyed out state and set it correctly
+ const isNodeTypeGreyedOut:boolean = isGreyedOutMap.get(nodeType) ?? false
+ isGreyedOutMap.set(nodeType,!isNodeTypeGreyedOut)
+ //for all elements set the node state
+ for(const element of elements){
+ element.classList.toggle('legend-passive', !isNodeTypeGreyedOut)
+ }
+ }}className={`legend-element ${nodeType}-node ${nodeType}-node-legend`}>{nodeType}