Added badge content example to button doctest.

This commit is contained in:
Sebastian Kupke 2019-08-06 12:01:32 +02:00
parent ca16516073
commit 05c952fbe1
70 changed files with 217 additions and 177 deletions

38
dist/iwmlib.js vendored
View File

@ -4457,6 +4457,8 @@
DOMScatter$1.zIndex = 1000;
/* eslint-disable no-unused-vars */
class CardLoader {
constructor(
src,
@ -4477,7 +4479,7 @@
this.x = x;
this.y = y;
this.scale = scale;
this.rotation = 0;
this.rotation = rotation;
this.maxScale = maxScale;
this.minScale = minScale;
this.wantedWidth = width;
@ -4485,12 +4487,6 @@
this.maxWidth = maxWidth != null ? maxWidth : window.innerWidth;
this.maxHeight = maxHeight != null ? maxHeight : window.innerHeight;
this.addedNode = null;
console.log({
width,
height,
maxWidth,
maxHeight
});
}
unload() {
@ -4575,7 +4571,6 @@
return new Promise((resolve, reject) => {
let isFrame = domNode instanceof HTMLIFrameElement;
let iframe = isFrame ? domNode : document.createElement('iframe');
console.log('FrameLoader.load', isFrame, iframe, this.src);
iframe.frameBorder = 0;
iframe.style.scrolling = false;
iframe.width = this.wantedWidth;
@ -4602,14 +4597,9 @@
let xhr = new XMLHttpRequest();
xhr.open('GET', this.src, false);
xhr.onload = e => {
domNode.innerHTML = xhr.response;
domNode.innerHTML = this.prepare(xhr.response);
this.addedNode = domNode.firstElementChild;
let { width, height } = this.size(this.addedNode);
console.log('HTMLLoader.load', {
added: this.addedNode,
width,
height
});
if (width) this.wantedWidth = width || this.wantedWidth;
if (height) this.wantedHeight = height || this.wantedHeight;
resolve(this);
@ -4621,6 +4611,18 @@
})
}
/**
* Preoares the html before it is assigned with innerHTML.
* Can be overwritten in subclasses.
*
* @param {*} html
* @returns
* @memberof HTMLLoader
*/
prepare(html) {
return html
}
/**
* Tries to determine the size of the addedNode.
* Checks for explicit width and height style attributes.
@ -4776,7 +4778,6 @@
}
setupFlippable(flippable, loader) {
console.log('setupFlippable', loader.wantedWidth);
flippable.wantedWidth = loader.wantedWidth;
flippable.wantedHeight = loader.wantedHeight;
flippable.wantedScale = loader.scale;
@ -4786,7 +4787,6 @@
}
start({ targetCenter = null } = {}) {
console.log('DOMFlip.start', targetCenter);
if (this.preloadBack) {
this.flippable.start({ duration: this.flipDuration, targetCenter });
} else {
@ -4936,7 +4936,6 @@
clickInfo() {
this.bringToFront();
console.log('clickInfo');
this.infoBtn.click();
}
@ -4963,6 +4962,7 @@
let startScale = this.element._gsTransform.scaleX;
let w = this.element.style.width;
let h = this.element.style.height;
// eslint-disable-next-line no-console
console.log(info, startX, startY, startAngle, startScale, w, h);
}
@ -5032,14 +5032,12 @@
let y = this.flipped ? yy : this.startY;
let onUpdate = this.onUpdate !== null ? () => this.onUpdate(this) : null;
console.log('start', this.flipDuration);
TweenLite.to(this.card, this.flipDuration, {
rotationY: targetY,
ease: Power1.easeOut,
transformOrigin: '50% 50%',
onUpdate,
onComplete: e => {
console.log('start end', this.flipDuration);
if (this.flipped) {
//this.hide(this.front)
this.enable(this.backBtn);
@ -5070,8 +5068,6 @@
},
force3D: true
});
console.log('start 2', this.wantedWidth, this.startWidth, { w, h });
// See https://greensock.com/forums/topic/7997-rotate-the-shortest-way/
TweenLite.to(this.element, this.flipDuration / 2, {
scale: targetScale,

78
dist/iwmlib.pixi.js vendored
View File

@ -2569,34 +2569,12 @@
}
const badge = new Badge(opts);
switch (opts.align) {
case 'left':
badge.x = this.x - badge.width / 2 + opts.offsetLeft;
break
case 'center':
badge.x = this.x + this.width / 2 - badge.width / 2 + opts.offsetLeft;
break
case 'right':
badge.x = this.x + this.width - badge.width / 2 + opts.offsetLeft;
}
switch (opts.verticalAlign) {
case 'top':
badge.y = this.y - badge.height / 2 + opts.offsetTop;
break
case 'middle':
badge.y = this.y + this.height / 2 - badge.height / 2 + opts.offsetTop;
break
case 'bottom':
badge.y = this.y + this.height - badge.height / 2 + opts.offsetTop;
}
this.addChild(badge);
this.badge = badge;
}
this.layout();
// set position
//-----------------
this.position.set(this.opts.x, this.opts.y);
@ -2681,6 +2659,40 @@
this.icon = icon;
// badge
//--------------------
if (this.badge) {
this.removeChild(this.badge);
const width = this.width;
const height = this.height;
this.addChild(this.badge);
const badge = this.badge;
switch (badge.opts.align) {
case 'left':
badge.x = -badge.width / 2 + badge.opts.offsetLeft;
break
case 'center':
badge.x = width / 2 - badge.width / 2 + badge.opts.offsetLeft;
break
case 'right':
badge.x = width - badge.width / 2 + badge.opts.offsetLeft;
}
switch (badge.opts.verticalAlign) {
case 'top':
badge.y = -badge.height / 2 + badge.opts.offsetTop;
break
case 'middle':
badge.y = height / 2 - badge.height / 2 + badge.opts.offsetTop;
break
case 'bottom':
badge.y = height - badge.height / 2 + badge.opts.offsetTop;
}
}
// draw
//-----------------
this.draw();
@ -7859,6 +7871,8 @@
DOMScatter.zIndex = 1000;
/* eslint-disable no-unused-vars */
class CardLoader {
constructor(
src,
@ -7879,7 +7893,7 @@
this.x = x;
this.y = y;
this.scale = scale;
this.rotation = 0;
this.rotation = rotation;
this.maxScale = maxScale;
this.minScale = minScale;
this.wantedWidth = width;
@ -7887,12 +7901,6 @@
this.maxWidth = maxWidth != null ? maxWidth : window.innerWidth;
this.maxHeight = maxHeight != null ? maxHeight : window.innerHeight;
this.addedNode = null;
console.log({
width,
height,
maxWidth,
maxHeight
});
}
unload() {
@ -8042,7 +8050,6 @@
}
setupFlippable(flippable, loader) {
console.log('setupFlippable', loader.wantedWidth);
flippable.wantedWidth = loader.wantedWidth;
flippable.wantedHeight = loader.wantedHeight;
flippable.wantedScale = loader.scale;
@ -8052,7 +8059,6 @@
}
start({ targetCenter = null } = {}) {
console.log('DOMFlip.start', targetCenter);
if (this.preloadBack) {
this.flippable.start({ duration: this.flipDuration, targetCenter });
} else {
@ -8202,7 +8208,6 @@
clickInfo() {
this.bringToFront();
console.log('clickInfo');
this.infoBtn.click();
}
@ -8229,6 +8234,7 @@
let startScale = this.element._gsTransform.scaleX;
let w = this.element.style.width;
let h = this.element.style.height;
// eslint-disable-next-line no-console
console.log(info, startX, startY, startAngle, startScale, w, h);
}
@ -8298,14 +8304,12 @@
let y = this.flipped ? yy : this.startY;
let onUpdate = this.onUpdate !== null ? () => this.onUpdate(this) : null;
console.log('start', this.flipDuration);
TweenLite.to(this.card, this.flipDuration, {
rotationY: targetY,
ease: Power1.easeOut,
transformOrigin: '50% 50%',
onUpdate,
onComplete: e => {
console.log('start end', this.flipDuration);
if (this.flipped) {
//this.hide(this.front)
this.enable(this.backBtn);
@ -8336,8 +8340,6 @@
},
force3D: true
});
console.log('start 2', this.wantedWidth, this.startWidth, { w, h });
// See https://greensock.com/forums/topic/7997-rotate-the-shortest-way/
TweenLite.to(this.element, this.flipDuration / 2, {
scale: targetScale,

View File

@ -2924,7 +2924,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2380,7 +2380,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1804,7 +1804,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3505,7 +3505,7 @@ the tint property of the icon sprite.</p>
<div class="tag-source">
<a href="pixi_button.js.html#line622">button.js:622</a>
<a href="pixi_button.js.html#line633">button.js:633</a>
</div>
</div>
@ -3610,7 +3610,7 @@ the tint property of the icon sprite.</p>
<div class="tag-source">
<a href="pixi_button.js.html#line384">button.js:384</a>
<a href="pixi_button.js.html#line362">button.js:362</a>
</div>
</div>
@ -3715,7 +3715,7 @@ the tint property of the icon sprite.</p>
<div class="tag-source">
<a href="pixi_button.js.html#line606">button.js:606</a>
<a href="pixi_button.js.html#line617">button.js:617</a>
</div>
</div>
@ -3822,7 +3822,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3800,7 +3800,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -5102,7 +5102,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2615,7 +2615,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2518,7 +2518,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1565,7 +1565,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1767,7 +1767,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2349,7 +2349,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1567,7 +1567,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2632,7 +2632,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2591,7 +2591,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2447,7 +2447,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2348,7 +2348,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -5749,7 +5749,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2342,7 +2342,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2396,7 +2396,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1795,7 +1795,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2881,7 +2881,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1713,7 +1713,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2972,7 +2972,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3402,7 +3402,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1696,7 +1696,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3171,7 +3171,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1592,7 +1592,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1604,7 +1604,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1604,7 +1604,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2056,7 +2056,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2518,7 +2518,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -4189,7 +4189,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2105,7 +2105,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -3326,7 +3326,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1491,7 +1491,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1814,7 +1814,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2195,7 +2195,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1575,7 +1575,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1733,7 +1733,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1791,34 +1791,12 @@ export default class Button extends PIXI.Container {
}
const badge = new Badge(opts)
switch (opts.align) {
case 'left':
badge.x = this.x - badge.width / 2 + opts.offsetLeft
break
case 'center':
badge.x = this.x + this.width / 2 - badge.width / 2 + opts.offsetLeft
break
case 'right':
badge.x = this.x + this.width - badge.width / 2 + opts.offsetLeft
}
switch (opts.verticalAlign) {
case 'top':
badge.y = this.y - badge.height / 2 + opts.offsetTop
break
case 'middle':
badge.y = this.y + this.height / 2 - badge.height / 2 + opts.offsetTop
break
case 'bottom':
badge.y = this.y + this.height - badge.height / 2 + opts.offsetTop
}
this.addChild(badge)
this.badge = badge
}
this.layout()
// set position
//-----------------
this.position.set(this.opts.x, this.opts.y)
@ -1903,6 +1881,39 @@ export default class Button extends PIXI.Container {
this.icon = icon
// badge
//--------------------
if (this.badge) {
this.removeChild(this.badge)
const width = this.width
const height = this.height
this.addChild(this.badge)
const badge = this.badge
switch (badge.opts.align) {
case 'left':
badge.x = -badge.width / 2 + badge.opts.offsetLeft
break
case 'center':
badge.x = width / 2 - badge.width / 2 + badge.opts.offsetLeft
break
case 'right':
badge.x = width - badge.width / 2 + badge.opts.offsetLeft
}
switch (badge.opts.verticalAlign) {
case 'top':
badge.y = -badge.height / 2 + badge.opts.offsetTop
break
case 'middle':
badge.y = height / 2 - badge.height / 2 + badge.opts.offsetTop
break
case 'bottom':
badge.y = height - badge.height / 2 + badge.opts.offsetTop
}
}
// draw
//-----------------
this.draw()
@ -2163,7 +2174,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2153,7 +2153,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2557,7 +2557,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1912,7 +1912,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1861,7 +1861,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1840,7 +1840,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1589,7 +1589,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1670,7 +1670,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1680,7 +1680,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1583,7 +1583,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1765,7 +1765,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1524,7 +1524,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1929,7 +1929,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1983,7 +1983,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1724,7 +1724,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1617,7 +1617,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -1621,7 +1621,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -2472,7 +2472,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 Mon Aug 05 2019 11:44:33 GMT+0200 (Mitteleuropäische Sommerzeit)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Tue Aug 06 2019 12:01:03 GMT+0200 (Mitteleuropäische Sommerzeit)
</div>
</footer>
</div>

View File

@ -289,13 +289,33 @@ const button24 = new Button({
}
})
const button25 = new Button({
x: 300,
y: 460,
icon: 'add',
badge: {
content: 'Click the button',
align: 'center',
verticalAlign: 'top',
offsetTop: -20,
radius: 12,
fill: 0x5856d6
},
action: event => {
const countries = ['Tajikistan', 'Zambia', 'Dominica', 'Australia', 'Botswana', 'Mozambique', 'Lesotho', 'Thailand', 'Gabon', 'Cuba', 'Mexico', 'Central African Republic', 'Réunion', 'Montenegro', 'Romania', 'Jamaica', 'Thailand', 'Cameroon', 'French Guiana', 'Nigeria', 'Tokelau', 'Slovenia', 'Kuwait', 'Palestinian Territories', 'Estonia', 'Germany', 'Cameroon', 'Somalia', 'El Salvador', 'San Marino', 'Sierra Leone', 'Sierra Leone', 'Gibraltar', 'Benin', 'Russia', 'Iraq', 'Tunisia', 'Greenland', 'Côte d\'Ivoire', 'Tanzania', 'Zambia', 'Bermuda', 'Somalia', 'Malaysia', 'Croatia', 'Togo', 'Belgium', 'Uruguay', 'Equatorial Guinea', 'Nigeria', 'St. Martin', 'Tuvalu', 'South Africa', 'Hong Kong SAR China', 'Palau', 'Canary Islands', 'Algeria', 'Hong Kong SAR China', 'Brunei', 'Dominican Republic', 'Sierra Leone', 'Moldova', 'Indonesia', 'Central African Republic', 'Anguilla', 'Malaysia', 'Bahrain', 'Indonesia', 'Peru', 'Namibia', 'Congo - Brazzaville', 'Micronesia', 'Cambodia', 'Réunion', 'Honduras', 'Hungary', 'Brazil', 'Trinidad & Tobago', 'Hungary', 'Madagascar', 'Sierra Leone', 'Seychelles', 'St. Martin', 'New Caledonia', 'Tokelau', 'Macedonia', 'Netherlands', 'Panama', 'Venezuela', 'Nepal', 'Guernsey', 'Papua New Guinea', 'Finland', 'Malaysia', 'Hong Kong SAR China', 'Trinidad & Tobago', 'Montserrat', 'Comoros', 'Benin', 'South Korea', 'Peru', 'Botswana', 'Cambodia', 'Isle of Man', 'Mozambique']
const country = countries[Math.floor(Math.random() * countries.length)]
button25.badge.content = country
button25.layout()
}
})
app.scene.addChild(button1, button2, button3, button4, button5, button6)
app.scene.addChild(button7, button8)
app.scene.addChild(button9, button10, button11)
app.scene.addChild(button12, button13)
app.scene.addChild(button14, button15, button16, button17)
app.scene.addChild(button18, button19, button20, button21)
app.scene.addChild(button22, button23, button24)
app.scene.addChild(button22, button23, button24, button25)
</script>
</body>
</html>

View File

@ -339,34 +339,12 @@ export default class Button extends PIXI.Container {
}
const badge = new Badge(opts)
switch (opts.align) {
case 'left':
badge.x = this.x - badge.width / 2 + opts.offsetLeft
break
case 'center':
badge.x = this.x + this.width / 2 - badge.width / 2 + opts.offsetLeft
break
case 'right':
badge.x = this.x + this.width - badge.width / 2 + opts.offsetLeft
}
switch (opts.verticalAlign) {
case 'top':
badge.y = this.y - badge.height / 2 + opts.offsetTop
break
case 'middle':
badge.y = this.y + this.height / 2 - badge.height / 2 + opts.offsetTop
break
case 'bottom':
badge.y = this.y + this.height - badge.height / 2 + opts.offsetTop
}
this.addChild(badge)
this.badge = badge
}
this.layout()
// set position
//-----------------
this.position.set(this.opts.x, this.opts.y)
@ -451,6 +429,39 @@ export default class Button extends PIXI.Container {
this.icon = icon
// badge
//--------------------
if (this.badge) {
this.removeChild(this.badge)
const width = this.width
const height = this.height
this.addChild(this.badge)
const badge = this.badge
switch (badge.opts.align) {
case 'left':
badge.x = -badge.width / 2 + badge.opts.offsetLeft
break
case 'center':
badge.x = width / 2 - badge.width / 2 + badge.opts.offsetLeft
break
case 'right':
badge.x = width - badge.width / 2 + badge.opts.offsetLeft
}
switch (badge.opts.verticalAlign) {
case 'top':
badge.y = -badge.height / 2 + badge.opts.offsetTop
break
case 'middle':
badge.y = height / 2 - badge.height / 2 + badge.opts.offsetTop
break
case 'bottom':
badge.y = height - badge.height / 2 + badge.opts.offsetTop
}
}
// draw
//-----------------
this.draw()