Fixed vertical button group bug.

This commit is contained in:
Sebastian Kupke 2019-08-07 15:03:58 +02:00
parent caffee4b15
commit 56910a8c58
2 changed files with 4 additions and 4 deletions

4
dist/iwmlib.pixi.js vendored
View File

@ -3443,8 +3443,8 @@
if (this.__initHeight > this.opts.maxHeight) {
// stack!
const distanceToTop = this.container.y;
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height;
const distanceToBottom = this.opts.maxHeight - this.container.y - this.__initHeight;
if (distanceToTop > 0) {
throwProps.y.end = 0;
} else if (distanceToBottom > 0) {

View File

@ -505,8 +505,8 @@ export default class ButtonGroup extends PIXI.Container {
if (this.__initHeight > this.opts.maxHeight) {
// stack!
const distanceToTop = this.container.y
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height
const distanceToBottom = this.opts.maxHeight - this.container.y - this.__initHeight
if (distanceToTop > 0) {
throwProps.y.end = 0
} else if (distanceToBottom > 0) {