undo dojo.place ?

Game development with Board Game Arena Studio
Post Reply
User avatar
ddyer
Posts: 67
Joined: 01 April 2011, 19:55

undo dojo.place ?

Post 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 ) );
User avatar
Tirix
Posts: 32
Joined: 17 December 2012, 15:13

Re: undo dojo.place ?

Post 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.
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: undo dojo.place ?

Post by sourisdudesert »

That's it :)
Post Reply

Return to “Developers”