Adding click functionality to highlight union of selected nodes