I've run into a strange behavior with a Canvas component. I'm using a
Canvas to do some basic GoogleMap-like functionality: I add images to
the canvas, it's got scrollbars because the added images sometimes
extend the size of the canvas beyond it's container size, and it's
draggable. There are times when I need to load a new set of images. In
those cases, I simple call removeAllChildren() and then start adding
my new images. 

It worked fine until I set the backgroundColor. Prior to this I had
not set the bgColor so I was just using the default. The strange
effect that has created is when I want to 'refresh' the canvas with a
new set of images (and call removeAllChildren()), it leaves behind the
images that are in the viewable portion of the canvas. If I drag the
canvas around so that the old images get clipped, then they get
'painted' over with the background color (which is simply black).

I've tried calling validateNow() in between the removeAllChildren()
and drawing my new set of images, but that didn't clear up the old
images either. I have no other properties or styles set on the canvas
component except for left/right/bottom/top.

Any ideas what's causing this?

Thanks

Reply via email to