Open ricardo opened 7 years ago
I'm trying to change the stacking order of my sprites by setting the z property in the init function. But no matter what value I put in, it always stacks the elements in the order I add them to the stage.
Q.Sprite.extend('Test',{ init: function(props) { this._super(props, { w: 20, h: 20 }); } }); stage.insert(new Q.Test({ z: 2, color: 'blue' })); stage.insert(new Q.Test({ z: 1, color: 'red' }));
I'm trying to change the stacking order of my sprites by setting the z property in the init function. But no matter what value I put in, it always stacks the elements in the order I add them to the stage.