1

In my code i am redrawing a rectangle every time a user moves their mouse to track it, but as said here, the .draw method will not remove the old drawing of the shape.

So my question is, how do i remove the old drawing? Is there some sort of .remove() method?

Thanks in advance,

iLinked

iLinked
  • 131
  • 1
  • 1
  • 4
  • 1
    I browsed the docs for a bit and apparently, the default behavior of a layer it to clear itself before each redraw. Can you add a [mre] to your question? –  Feb 17 '20 at 17:00
  • turns out the reason behind why it overlapped was because i only redrew the shape, not the layer. When i changed it it worked. Thanks! – iLinked Feb 17 '20 at 17:05

0 Answers0