Fixed dragging behaviour in graphs

This is related to item 4 in #46. I have no idea how this backfires on tablets, I will have to add touchstart / touchend events I presume, but I have no way of testing this.