Fixed button hover bug.
This commit is contained in:
parent
32087608cc
commit
1e3f66bb19
20
dist/iwmlib.pixi.js
vendored
20
dist/iwmlib.pixi.js
vendored
@ -2482,13 +2482,11 @@
|
|||||||
this.capture(e);
|
this.capture(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.button.on('pointerout', e => {
|
this.button.on('pointerout', this.onEnd.bind(this));
|
||||||
this.capture(e);
|
this.button.on('pointercancel', this.onEnd.bind(this));
|
||||||
TweenLite.to([this.button, this.content], this.theme.fast, {
|
this.button.on('pointerupoutside', this.onEnd.bind(this));
|
||||||
alpha: 1,
|
this.button.on('pointertap', this.onEnd.bind(this));
|
||||||
overwrite: 'none'
|
this.button.on('scroll', this.onEnd.bind(this));
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
this.button.on('pointerdown', e => {
|
this.button.on('pointerdown', e => {
|
||||||
@ -2921,6 +2919,14 @@
|
|||||||
this.icon.tint = value;
|
this.icon.tint = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onEnd(event) {
|
||||||
|
this.capture(event);
|
||||||
|
TweenLite.to([this.button, this.content], this.theme.fast, {
|
||||||
|
alpha: 1,
|
||||||
|
overwrite: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* globals ThrowPropsPlugin, Strong */
|
/* globals ThrowPropsPlugin, Strong */
|
||||||
|
@ -252,13 +252,11 @@ export default class Button extends PIXI.Container {
|
|||||||
this.capture(e)
|
this.capture(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
this.button.on('pointerout', e => {
|
this.button.on('pointerout', this.onEnd.bind(this))
|
||||||
this.capture(e)
|
this.button.on('pointercancel', this.onEnd.bind(this))
|
||||||
TweenLite.to([this.button, this.content], this.theme.fast, {
|
this.button.on('pointerupoutside', this.onEnd.bind(this))
|
||||||
alpha: 1,
|
this.button.on('pointertap', this.onEnd.bind(this))
|
||||||
overwrite: 'none'
|
this.button.on('scroll', this.onEnd.bind(this))
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
this.button.on('pointerdown', e => {
|
this.button.on('pointerdown', e => {
|
||||||
@ -691,4 +689,12 @@ export default class Button extends PIXI.Container {
|
|||||||
this.icon.tint = value
|
this.icon.tint = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onEnd(event) {
|
||||||
|
this.capture(event)
|
||||||
|
TweenLite.to([this.button, this.content], this.theme.fast, {
|
||||||
|
alpha: 1,
|
||||||
|
overwrite: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user