dag: handle clicking on edges

The context menu event raised an attribute error when invoked on an
edge.  Handle this case.

Signed-off-by: David Aguilar <davvid@gmail.com>