add node/edge click listeners to graph