Added 'draw' event to component constructor when element is added to the DOM tree. Added 'detach' event when element is removed from the DOM tree.