Hi All,

I am relatively quite new to mootools and web development as a whole,
so I may lack some basic understanding on how mootools work. This
question may be very trivial or outright dumb if you may, but I would
really appreciate a little help. I am using Mootools Canvas Library
(http://forvar.de/js/mcl/docs.CanvasItem.html#fn-destroy)

I want to destroy a sets of items on my canvas which are selected.

If you have a look at the following code, http://jsfiddle.net/WRRns/
you will notice, if I click on any one of the squares and drag the
pointer, all the squares in the path get selected and on mouse up they
restore their state.

Now here is what I would like to do. OnMouseUp, I would like to
deleted the boxes whose state have been marked as pressed. The problem
is I cannot quite get a grip on how exactly the destroy function of
mootools canvas library works (syntax to use it.)

I have tried out something like this to destroy the boxes but that
doesn't seem to help
CANVAS.layers.get('items').items['itemID'].destroy();

If you could please share with me whatever little insight you may have
to provide of how I could get this to work.

Thanks and Regards
Shouvik

Reply via email to