Changed calling order

This commit is contained in:
Uwe Oestermeier 2020-02-03 10:06:01 +01:00
parent 7bb3b696f7
commit e6f6f6b185

View File

@ -288,10 +288,6 @@ export default class Button extends PIXI.Container {
this.opts.beforeAction.call(this, e, this)
}
if (this.opts.action) {
this.opts.action.call(this, e, this)
}
TweenLite.to([this.button, this.content], this.theme.fast, {
alpha: 0.83,
overwrite: 'none'
@ -301,6 +297,10 @@ export default class Button extends PIXI.Container {
this.active = !this.active
}
if (this.opts.action) {
this.opts.action.call(this, e, this)
}
if (this.opts.afterAction) {
this.opts.afterAction.call(this, e, this)
}