Bring object to front dynamically doesn't work anymore
Hello, I followed other threads to bring objects to the front dynamically through all the following scripts in HTML5.
// ES5 setChildIndex
this.bringToFront = function(e) {
e.currentTarget.parent.setChildIndex(e.currentTarget, e.currentTarget.parent.numChildren - 1);
}
// ES6 setChildIndex
this.bringToFront = (e) => {
e.currentTarget.parent.setChildIndex(e.currentTarget, e.currentTarget.parent.numChildren - 1);
}
// ES5 addChild
this.bringToFront = function(e) {
e.currentTarget.parent.addChild(e.currentTarget);
}
// ES6 addChild
this.bringToFront = (e) => {
e.currentTarget.parent.addChild(e.currentTarget);
}
None of these methods work any more. Maybe there was an update. Could anyone tell an alternate way?
