1) validate graph before repaint
2) update detail panel when node changed accordingly