remove component from canvas when x is clicked