resize and graph. fixes #205
refactor annotation mouse handling to reduce duplicate code