Page 1 of 1

undo dojo.place ?

Posted: 23 March 2013, 03:04
by ddyer
what is the proper "unplace" to undo

dojo.place( this.format_block('jstpl_stone', {
stone_type:'stone_' + notif.args.color+"_"+this.board_size,
x:notif.args.coord_x,
y:notif.args.coord_y
} ), $( intersection ) );

Re: undo dojo.place ?

Posted: 23 March 2013, 06:02
by Tirix
I would suggest destroy:

Code: Select all

// Destroy a node byId:
var stoneId = "stone_"+x+"_"+y;
dojo.destroy(stoneId);
stoneId has to be the id of the stone you want to destroy.
See http://dojotoolkit.org/reference-guide/ ... stroy.html.

Re: undo dojo.place ?

Posted: 23 March 2013, 09:24
by sourisdudesert
That's it :)