Merge branch 'master' of gitea.iwm-tuebingen.de:IWMBrowser/iwmlib

This commit is contained in:
Uwe Oestermeier 2019-08-01 19:34:49 +02:00
commit 81e21736b7
73 changed files with 249 additions and 157 deletions

View File

@ -4,8 +4,6 @@ circle {
stroke-width: 8px;
}
mask circle {
stroke-width: 0;
fill: white;

9
dist/iwmlib.js vendored
View File

@ -5237,6 +5237,8 @@
Poppable.registrations = new Map();
/* eslint-disable no-console */
/** A Popup that shows text labels, images, or html
*/
class Popup$1 extends Poppable {
@ -5417,6 +5419,7 @@
}
for (let key in content) {
console.log('using', key, this.loaded);
switch (key) {
case 'selector':
break
@ -5525,7 +5528,7 @@
handleClose(e) {
let closing = this.closingEvent(e);
if (closing) {
this.close();
this.close(e);
} else {
this.setupCloseHandler();
}
@ -5653,11 +5656,11 @@
/** Close and remove the Popup from the DOM tree.
*/
close() {
close(event) {
//console.log("Popup.close", this.closeCommand)
this.unregister(this.context);
if (this.closeCommand) {
this.closeCommand(this, () => this.remove());
this.closeCommand(this, () => this.remove(), event);
} else {
this.remove();
}

78
dist/iwmlib.pixi.js vendored
View File

@ -2482,13 +2482,11 @@
this.capture(e);
});
this.button.on('pointerout', e => {
this.capture(e);
TweenLite.to([this.button, this.content], this.theme.fast, {
alpha: 1,
overwrite: 'none'
});
});
this.button.on('pointerout', this.onEnd.bind(this));
this.button.on('pointercancel', this.onEnd.bind(this));
this.button.on('pointerupoutside', this.onEnd.bind(this));
this.button.on('pointertap', this.onEnd.bind(this));
this.button.on('scroll', this.onEnd.bind(this));
// eslint-disable-next-line no-unused-vars
this.button.on('pointerdown', e => {
@ -2921,6 +2919,14 @@
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 */
@ -3477,7 +3483,7 @@
this.buttons.forEach((it, index) => {
const leftCorner = it.__originalPosition.x + this.container.x;
const rightCorner = it.__originalPosition.x + it.width;
const rightCorner = it.__originalPosition.x + it.button.width;
const paddingLeft = index * this.opts.stackPadding;
const paddingRight = reverseCounter * this.opts.stackPadding;
if (leftCorner < paddingLeft) {
@ -3485,7 +3491,7 @@
it.x = -this.container.x + paddingLeft;
} else if (rightCorner > -this.container.x + this.opts.maxWidth - paddingRight) {
// right border
it.x = -this.container.x + this.opts.maxWidth - it.width - paddingRight;
it.x = -this.container.x + this.opts.maxWidth - it.button.width - paddingRight;
} else {
it.x = it.__originalPosition.x;
}
@ -3496,21 +3502,30 @@
});
const min = Math.min(...sorted.map(it => it.x));
const max = Math.max(...sorted.map(it => it.x));
const max = Math.max(...sorted.map(it => it.x + it.button.width));
const center = (min + max) / 2;
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.x - center);
const distanceB = Math.abs(b.x - center);
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.x + a.button.width / 2;
const centerB = b.x + b.button.width / 2;
if (centerA < center && centerB < center) {
if (a.x < b.x) {
return -1
} else {
return 0
} else if (b.x < a.x) {
return 1
}
} else if (centerA > center && centerB > center) {
if (a.x + a.button.width > b.x + b.button.width) {
return -1
} else if (b.x + b.button.width < a.x + a.button.x) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it));
}
@ -3525,7 +3540,7 @@
this.buttons.forEach((it, index) => {
const topCorner = it.__originalPosition.y + this.container.y;
const bottomCorner = it.__originalPosition.y + it.height;
const bottomCorner = it.__originalPosition.y + it.button.height;
const paddingTop = index * this.opts.stackPadding;
const paddingBottom = reverseCounter * this.opts.stackPadding;
if (topCorner < paddingTop) {
@ -3533,7 +3548,7 @@
it.y = -this.container.y + paddingTop;
} else if (bottomCorner > -this.container.y + this.opts.maxHeight - paddingBottom) {
// bottom border
it.y = -this.container.y + this.opts.maxHeight - it.height - paddingBottom;
it.y = -this.container.y + this.opts.maxHeight - it.button.height - paddingBottom;
} else {
it.y = it.__originalPosition.y;
}
@ -3544,21 +3559,30 @@
});
const min = Math.min(...sorted.map(it => it.y));
const max = Math.max(...sorted.map(it => it.y));
const max = Math.max(...sorted.map(it => it.y + it.button.height));
const center = (min + max) / 2;
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.y - center);
const distanceB = Math.abs(b.y - center);
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.y + a.button.height / 2;
const centerB = b.y + b.button.height / 2;
if (centerA < center && centerB < center) {
if (a.y < b.y) {
return -1
} else {
return 0
} else if (b.y < a.y) {
return 1
}
} else if (centerA > center && centerB > center) {
if (a.y + a.button.height > b.y + b.button.height) {
return -1
} else if (b.y + b.button.height < a.y + a.button.y) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it));
}

View File

@ -2920,7 +2920,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2376,7 +2376,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1800,7 +1800,7 @@ app.scene.filters = [blurFilter]</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3818,7 +3818,7 @@ the tint property of the icon sprite.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3107,7 +3107,7 @@ app.scene.addChild(buttonGroup)</code></pre>
<div class="tag-source">
<a href="pixi_buttongroup.js.html#line602">buttongroup.js:602</a>
<a href="pixi_buttongroup.js.html#line611">buttongroup.js:611</a>
</div>
</div>
@ -3692,7 +3692,7 @@ app.scene.addChild(buttonGroup)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -5098,7 +5098,7 @@ i.e. after loading a single tile</p></td>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2611,7 +2611,7 @@ on completion.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2514,7 +2514,7 @@ front.on('click', event => flippable.toggle())</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1561,7 +1561,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1763,7 +1763,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2345,7 +2345,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1563,7 +1563,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2628,7 +2628,7 @@ than wanted</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2587,7 +2587,7 @@ app.scene.addChild(list)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2443,7 +2443,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2344,7 +2344,7 @@ a string or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -5745,7 +5745,7 @@ rejected with an error.</td>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2338,7 +2338,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2392,7 +2392,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,7 +1791,7 @@ like Popup, Message...</p></div>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2877,7 +2877,7 @@ app.scene.addChild(progress)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1709,7 +1709,7 @@ app.loader
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2968,7 +2968,7 @@ app.scene.addChild(slider)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3398,7 +3398,7 @@ app.scene.addChild(switch1)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1692,7 +1692,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3167,7 +3167,7 @@ const app = new PIXIApp({
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1588,7 +1588,7 @@ const app = new PIXIApp({
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1600,7 +1600,7 @@ const app = new PIXIApp({
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1600,7 +1600,7 @@ const app = new PIXIApp({
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2052,7 +2052,7 @@ an indicator of tiles to free.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2514,7 +2514,7 @@ a string, a number or a PIXI.Text object.</p>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -4185,7 +4185,7 @@ test.start()</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2101,7 +2101,7 @@ app.scene.addChild(button)</code></pre>
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3322,7 +3322,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1487,7 +1487,7 @@
<footer class="content-size">
<div class="footer">
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1810,7 +1810,7 @@ export default class AbstractPopup extends PIXI.Graphics {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2191,7 +2191,7 @@ class FpsDisplay extends PIXI.Graphics {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1571,7 +1571,7 @@ export default class Badge extends AbstractPopup {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1729,7 +1729,7 @@ class TiltShiftYFilter extends TiltShiftAxisFilter {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2153,7 +2153,7 @@ export default class Button 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2004,7 +2004,7 @@ export default class ButtonGroup extends PIXI.Container {
this.buttons.forEach((it, index) => {
const leftCorner = it.__originalPosition.x + this.container.x
const rightCorner = it.__originalPosition.x + it.width
const rightCorner = it.__originalPosition.x + it.button.width
const paddingLeft = index * this.opts.stackPadding
const paddingRight = reverseCounter * this.opts.stackPadding
if (leftCorner &lt; paddingLeft) {
@ -2012,7 +2012,7 @@ export default class ButtonGroup extends PIXI.Container {
it.x = -this.container.x + paddingLeft
} else if (rightCorner > -this.container.x + this.opts.maxWidth - paddingRight) {
// right border
it.x = -this.container.x + this.opts.maxWidth - it.width - paddingRight
it.x = -this.container.x + this.opts.maxWidth - it.button.width - paddingRight
} else {
it.x = it.__originalPosition.x
}
@ -2023,21 +2023,30 @@ export default class ButtonGroup extends PIXI.Container {
})
const min = Math.min(...sorted.map(it => it.x))
const max = Math.max(...sorted.map(it => it.x))
const max = Math.max(...sorted.map(it => it.x + it.button.width))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.x - center)
const distanceB = Math.abs(b.x - center)
if (distanceA &lt; distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.x + a.button.width / 2
const centerB = b.x + b.button.width / 2
if (centerA &lt; center &amp;&amp; centerB &lt; center) {
if (a.x &lt; b.x) {
return -1
} else {
return 0
} else if (b.x &lt; a.x) {
return 1
}
} else if (centerA > center &amp;&amp; centerB > center) {
if (a.x + a.button.width > b.x + b.button.width) {
return -1
} else if (b.x + b.button.width &lt; a.x + a.button.x) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it))
}
@ -2052,7 +2061,7 @@ export default class ButtonGroup extends PIXI.Container {
this.buttons.forEach((it, index) => {
const topCorner = it.__originalPosition.y + this.container.y
const bottomCorner = it.__originalPosition.y + it.height
const bottomCorner = it.__originalPosition.y + it.button.height
const paddingTop = index * this.opts.stackPadding
const paddingBottom = reverseCounter * this.opts.stackPadding
if (topCorner &lt; paddingTop) {
@ -2060,7 +2069,7 @@ export default class ButtonGroup extends PIXI.Container {
it.y = -this.container.y + paddingTop
} else if (bottomCorner > -this.container.y + this.opts.maxHeight - paddingBottom) {
// bottom border
it.y = -this.container.y + this.opts.maxHeight - it.height - paddingBottom
it.y = -this.container.y + this.opts.maxHeight - it.button.height - paddingBottom
} else {
it.y = it.__originalPosition.y
}
@ -2071,21 +2080,30 @@ export default class ButtonGroup extends PIXI.Container {
})
const min = Math.min(...sorted.map(it => it.y))
const max = Math.max(...sorted.map(it => it.y))
const max = Math.max(...sorted.map(it => it.y + it.button.height))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.y - center)
const distanceB = Math.abs(b.y - center)
if (distanceA &lt; distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.y + a.button.height / 2
const centerB = b.y + b.button.height / 2
if (centerA &lt; center &amp;&amp; centerB &lt; center) {
if (a.y &lt; b.y) {
return -1
} else {
return 0
} else if (b.y &lt; a.y) {
return 1
}
} else if (centerA > center &amp;&amp; centerB > center) {
if (a.y + a.button.height > b.y + b.button.height) {
return -1
} else if (b.y + b.button.height &lt; a.y + a.button.y) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it))
}
@ -2103,7 +2121,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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2553,7 +2553,7 @@ export class DeepZoomImage 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1908,7 +1908,7 @@ export default class Flippable extends PIXI.projection.Camera3d {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1857,7 +1857,7 @@ export class BitmapLabeledGraphics extends LabeledGraphics {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1836,7 +1836,7 @@ export default class List 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1585,7 +1585,7 @@ export default class Message extends InteractivePopup {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1666,7 +1666,7 @@ export default class Modal 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1676,7 +1676,7 @@ export default class Popup extends InteractivePopup {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1579,7 +1579,7 @@ export default class PopupMenu extends Popup {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1761,7 +1761,7 @@ export default class Progress 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1520,7 +1520,7 @@ export default class Scrollview extends Scrollbox {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1925,7 +1925,7 @@ export default class Slider 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1979,7 +1979,7 @@ export default class Switch 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 Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1720,7 +1720,7 @@ export class ThemeRed extends Theme {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1613,7 +1613,7 @@ export default class Tooltip extends AbstractPopup {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1617,7 +1617,7 @@ export default class Volatile {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2468,7 +2468,7 @@ class Event {
<footer class="content-size">
<div class="footer">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Thu Aug 01 2019 10:17:52 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 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -252,13 +252,11 @@ export default class Button extends PIXI.Container {
this.capture(e)
})
this.button.on('pointerout', e => {
this.capture(e)
TweenLite.to([this.button, this.content], this.theme.fast, {
alpha: 1,
overwrite: 'none'
})
})
this.button.on('pointerout', this.onEnd.bind(this))
this.button.on('pointercancel', this.onEnd.bind(this))
this.button.on('pointerupoutside', this.onEnd.bind(this))
this.button.on('pointertap', this.onEnd.bind(this))
this.button.on('scroll', this.onEnd.bind(this))
// eslint-disable-next-line no-unused-vars
this.button.on('pointerdown', e => {
@ -691,4 +689,12 @@ export default class Button extends PIXI.Container {
this.icon.tint = value
}
}
onEnd(event) {
this.capture(event)
TweenLite.to([this.button, this.content], this.theme.fast, {
alpha: 1,
overwrite: 'none'
})
}
}

View File

@ -10,7 +10,7 @@
<script src="../3rdparty/highlight/highlight.pack.js"></script>
<script src="../../dist/iwmlib.3rdparty.js"></script>
<!-- <script src="../3rdparty/gsap/src/uncompressed/plugins/ThrowPropsPlugin.js"></script> -->
<script src="../3rdparty/gsap/src/uncompressed/plugins/ThrowPropsPlugin.js"></script>
<script src="../../dist/iwmlib.js"></script>
<script src="../../dist/iwmlib.pixi.js"></script>
@ -303,12 +303,33 @@ const buttonGroup17 = new ButtonGroup({
app
})
const buttonGroup18 = new ButtonGroup({
x: 10,
y: 1340,
buttons: [
{label: 'move'},
{label: 'explanation dried'},
{label: 'out catch'},
{label: 'late either'},
{label: 'tell pour'},
{label: 'willing apart airplane'},
{label: 'high war'},
{label: 'future struck'},
{label: 'sense image'},
{label: 'never'},
{label: 'mark cloth'},
{label: 'everywhere due large'}
],
maxWidth: 500,
app
})
app.scene.addChild(buttonGroup1, buttonGroup2, buttonGroup3)
app.scene.addChild(buttonGroup4)
app.scene.addChild(buttonGroup5, buttonGroup6)
app.scene.addChild(buttonGroup7, buttonGroup8)
app.scene.addChild(buttonGroup9, buttonGroup10, buttonGroup11, buttonGroup12, buttonGroup13)
app.scene.addChild(buttonGroup14, buttonGroup15, buttonGroup16, buttonGroup17)
app.scene.addChild(buttonGroup14, buttonGroup15, buttonGroup16, buttonGroup17, buttonGroup18)
</script>
</body>
</html>

View File

@ -556,7 +556,7 @@ export default class ButtonGroup extends PIXI.Container {
this.buttons.forEach((it, index) => {
const leftCorner = it.__originalPosition.x + this.container.x
const rightCorner = it.__originalPosition.x + it.width
const rightCorner = it.__originalPosition.x + it.button.width
const paddingLeft = index * this.opts.stackPadding
const paddingRight = reverseCounter * this.opts.stackPadding
if (leftCorner < paddingLeft) {
@ -564,7 +564,7 @@ export default class ButtonGroup extends PIXI.Container {
it.x = -this.container.x + paddingLeft
} else if (rightCorner > -this.container.x + this.opts.maxWidth - paddingRight) {
// right border
it.x = -this.container.x + this.opts.maxWidth - it.width - paddingRight
it.x = -this.container.x + this.opts.maxWidth - it.button.width - paddingRight
} else {
it.x = it.__originalPosition.x
}
@ -575,21 +575,30 @@ export default class ButtonGroup extends PIXI.Container {
})
const min = Math.min(...sorted.map(it => it.x))
const max = Math.max(...sorted.map(it => it.x))
const max = Math.max(...sorted.map(it => it.x + it.button.width))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.x - center)
const distanceB = Math.abs(b.x - center)
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.x + a.button.width / 2
const centerB = b.x + b.button.width / 2
if (centerA < center && centerB < center) {
if (a.x < b.x) {
return -1
} else {
return 0
} else if (b.x < a.x) {
return 1
}
} else if (centerA > center && centerB > center) {
if (a.x + a.button.width > b.x + b.button.width) {
return -1
} else if (b.x + b.button.width < a.x + a.button.x) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it))
}
@ -604,7 +613,7 @@ export default class ButtonGroup extends PIXI.Container {
this.buttons.forEach((it, index) => {
const topCorner = it.__originalPosition.y + this.container.y
const bottomCorner = it.__originalPosition.y + it.height
const bottomCorner = it.__originalPosition.y + it.button.height
const paddingTop = index * this.opts.stackPadding
const paddingBottom = reverseCounter * this.opts.stackPadding
if (topCorner < paddingTop) {
@ -612,7 +621,7 @@ export default class ButtonGroup extends PIXI.Container {
it.y = -this.container.y + paddingTop
} else if (bottomCorner > -this.container.y + this.opts.maxHeight - paddingBottom) {
// bottom border
it.y = -this.container.y + this.opts.maxHeight - it.height - paddingBottom
it.y = -this.container.y + this.opts.maxHeight - it.button.height - paddingBottom
} else {
it.y = it.__originalPosition.y
}
@ -623,21 +632,30 @@ export default class ButtonGroup extends PIXI.Container {
})
const min = Math.min(...sorted.map(it => it.y))
const max = Math.max(...sorted.map(it => it.y))
const max = Math.max(...sorted.map(it => it.y + it.button.height))
const center = (min + max) / 2
// z-index
sorted
.sort((a, b) => {
const distanceA = Math.abs(a.y - center)
const distanceB = Math.abs(b.y - center)
if (distanceA < distanceB) {
return 1
} else if (distanceA > distanceB) {
const centerA = a.y + a.button.height / 2
const centerB = b.y + b.button.height / 2
if (centerA < center && centerB < center) {
if (a.y < b.y) {
return -1
} else {
return 0
} else if (b.y < a.y) {
return 1
}
} else if (centerA > center && centerB > center) {
if (a.y + a.button.height > b.y + b.button.height) {
return -1
} else if (b.y + b.button.height < a.y + a.button.y) {
return 1
}
}
return 0
})
.forEach(it => it.parent.addChild(it))
}

View File

@ -1,3 +1,6 @@
/* eslint-disable no-console */
/* eslint-disable no-case-declarations */
/* eslint-disable no-unused-vars */
import { Elements } from './utils.js'
import Poppable from './poppable.js'
@ -181,6 +184,7 @@ export default class Popup extends Poppable {
}
for (let key in content) {
console.log('using', key, this.loaded)
switch (key) {
case 'selector':
break
@ -289,7 +293,7 @@ export default class Popup extends Poppable {
handleClose(e) {
let closing = this.closingEvent(e)
if (closing) {
this.close()
this.close(e)
} else {
this.setupCloseHandler()
}
@ -417,11 +421,11 @@ export default class Popup extends Poppable {
/** Close and remove the Popup from the DOM tree.
*/
close() {
close(event) {
//console.log("Popup.close", this.closeCommand)
this.unregister(this.context)
if (this.closeCommand) {
this.closeCommand(this, () => this.remove())
this.closeCommand(this, () => this.remove(), event)
} else {
this.remove()
}