Updated docs.

This commit is contained in:
2019-08-01 09:51:32 +02:00
parent a6f0341fe4
commit 56407539aa
67 changed files with 93 additions and 99 deletions
+25 -31
View File
@@ -2004,9 +2004,9 @@ export default class ButtonGroup extends PIXI.Container {
if (leftCorner < paddingLeft) {
// left border
it.x = -this.container.x + paddingLeft
} else if (rightCorner > Math.abs(this.container.x) + this.opts.maxWidth - paddingRight) {
} else if (rightCorner > -this.container.x + this.opts.maxWidth - paddingRight) {
// right border
it.x = Math.abs(this.container.x) + this.opts.maxWidth - it.width - paddingRight
it.x = -this.container.x + this.opts.maxWidth - it.width - paddingRight
} else {
it.x = it.__originalPosition.x
}
@@ -2016,24 +2016,21 @@ export default class ButtonGroup extends PIXI.Container {
sorted.push(it)
})
const min = Math.min(...sorted.map(it => it.x))
const max = Math.max(...sorted.map(it => it.x))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const delta = Math.abs(this.container.x) + this.opts.maxWidth / 2
const distanceA = Math.abs(a.x - delta)
const distanceB = Math.abs(b.x - delta)
if (distanceA > distanceB) {
return -1
} else if (distanceB > distanceA) {
const distanceA = Math.abs(a.x - center)
const distanceB = Math.abs(b.x - center)
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
return -1
} else {
if (a.__initIndex > b.__initIndex) {
return -1
} else if (b.__initIndex > a.__initIndex) {
return 1
} else {
return 0
}
return 0
}
})
.forEach(it => it.parent.addChild(it))
@@ -2055,9 +2052,9 @@ export default class ButtonGroup extends PIXI.Container {
if (topCorner < paddingTop) {
// top border
it.y = -this.container.y + paddingTop
} else if (bottomCorner > Math.abs(this.container.y) + this.opts.maxHeight - paddingBottom) {
} else if (bottomCorner > -this.container.y + this.opts.maxHeight - paddingBottom) {
// bottom border
it.y = Math.abs(this.container.y) + this.opts.maxHeight - it.height - paddingBottom
it.y = -this.container.y + this.opts.maxHeight - it.height - paddingBottom
} else {
it.y = it.__originalPosition.y
}
@@ -2067,24 +2064,21 @@ export default class ButtonGroup extends PIXI.Container {
sorted.push(it)
})
const min = Math.min(...sorted.map(it => it.y))
const max = Math.max(...sorted.map(it => it.y))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const delta = Math.abs(this.container.y) + this.opts.maxHeight / 2
const distanceA = Math.abs(a.y - delta)
const distanceB = Math.abs(b.y - delta)
if (distanceA > distanceB) {
return -1
} else if (distanceB > distanceA) {
const distanceA = Math.abs(a.y - center)
const distanceB = Math.abs(b.y - center)
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
return -1
} else {
if (a.__initIndex > b.__initIndex) {
return -1
} else if (b.__initIndex > a.__initIndex) {
return 1
} else {
return 0
}
return 0
}
})
.forEach(it => it.parent.addChild(it))
@@ -2103,7 +2097,7 @@ export default class ButtonGroup extends PIXI.Container {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Wed Jul 31 2019 15:00:47 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 09:51:15 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>