Added edit functionality to the draw widget.