Improved button group stacking behaviour if ThrowPropsPlugin is not loaded.
This commit is contained in:
parent
56407539aa
commit
e9f1246e0a
50
dist/iwmlib.pixi.js
vendored
50
dist/iwmlib.pixi.js
vendored
@ -2963,8 +2963,8 @@
|
||||
* or a Theme object.
|
||||
* @param {number} [opts.minWidth=44] - Button: The minimum width of one button.
|
||||
* @param {number} [opts.minHeight=44] - Button: The minimum height of one button.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.stackPadding=10] - The padding for stacked buttons.
|
||||
* @param {PIXI.Application} [opts.app] - The PixiJS Application. Must be set if you want to use the mousewheel to scroll your button group. Only used when the buttons are stacked (with maxWidth or maxHeight).
|
||||
* @param {number} [opts.padding=Theme.padding] - Button: The inner spacing (distance from icon and/or label) the the border.
|
||||
@ -3377,27 +3377,27 @@
|
||||
|
||||
this.capture(event);
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } };
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } };
|
||||
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x;
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth;
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0;
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth;
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y;
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height;
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0;
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height;
|
||||
}
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x;
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth;
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0;
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth;
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y;
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height;
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0;
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
ThrowPropsPlugin.to(
|
||||
this.container.position,
|
||||
{
|
||||
@ -3409,6 +3409,12 @@
|
||||
0.8,
|
||||
0.4
|
||||
);
|
||||
} else {
|
||||
if (this.opts.orientation === 'horizontal' && throwProps.x.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { x: throwProps.x.end, onUpdate: this.stack.bind(this) });
|
||||
} else if (this.opts.orientation === 'vertical' && throwProps.y.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { y: throwProps.y.end, onUpdate: this.stack.bind(this) });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3462,7 +3468,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
_stackHorizontal() {
|
||||
const sorted = [];
|
||||
@ -3510,7 +3516,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
_stackVertical() {
|
||||
const sorted = [];
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -1848,7 +1848,7 @@ or a Theme object.</p></td>
|
||||
|
||||
|
||||
|
||||
<p>The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.</p></td>
|
||||
<p>The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -1882,7 +1882,7 @@ or a Theme object.</p></td>
|
||||
|
||||
|
||||
|
||||
<p>The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.</p></td>
|
||||
<p>The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -3035,7 +3035,7 @@ app.scene.addChild(buttonGroup)</code></pre>
|
||||
|
||||
|
||||
<div class="tag-source">
|
||||
<a href="pixi_buttongroup.js.html#line548">buttongroup.js:548</a>
|
||||
<a href="pixi_buttongroup.js.html#line554">buttongroup.js:554</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3107,7 +3107,7 @@ app.scene.addChild(buttonGroup)</code></pre>
|
||||
|
||||
|
||||
<div class="tag-source">
|
||||
<a href="pixi_buttongroup.js.html#line596">buttongroup.js:596</a>
|
||||
<a href="pixi_buttongroup.js.html#line602">buttongroup.js:602</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3179,7 +3179,7 @@ app.scene.addChild(buttonGroup)</code></pre>
|
||||
|
||||
|
||||
<div class="tag-source">
|
||||
<a href="pixi_buttongroup.js.html#line529">buttongroup.js:529</a>
|
||||
<a href="pixi_buttongroup.js.html#line535">buttongroup.js:535</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -3618,7 +3618,7 @@ app.scene.addChild(buttonGroup)</code></pre>
|
||||
|
||||
|
||||
<div class="tag-source">
|
||||
<a href="pixi_buttongroup.js.html#line537">buttongroup.js:537</a>
|
||||
<a href="pixi_buttongroup.js.html#line543">buttongroup.js:543</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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -1490,8 +1490,8 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
* or a Theme object.
|
||||
* @param {number} [opts.minWidth=44] - Button: The minimum width of one button.
|
||||
* @param {number} [opts.minHeight=44] - Button: The minimum height of one button.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.stackPadding=10] - The padding for stacked buttons.
|
||||
* @param {PIXI.Application} [opts.app] - The PixiJS Application. Must be set if you want to use the mousewheel to scroll your button group. Only used when the buttons are stacked (with maxWidth or maxHeight).
|
||||
* @param {number} [opts.padding=Theme.padding] - Button: The inner spacing (distance from icon and/or label) the the border.
|
||||
@ -1904,27 +1904,27 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
|
||||
this.capture(event)
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } }
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } }
|
||||
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height
|
||||
}
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
ThrowPropsPlugin.to(
|
||||
this.container.position,
|
||||
{
|
||||
@ -1936,6 +1936,12 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
0.8,
|
||||
0.4
|
||||
)
|
||||
} else {
|
||||
if (this.opts.orientation === 'horizontal' && throwProps.x.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { x: throwProps.x.end, onUpdate: this.stack.bind(this) })
|
||||
} else if (this.opts.orientation === 'vertical' && throwProps.y.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { y: throwProps.y.end, onUpdate: this.stack.bind(this) })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1989,7 +1995,7 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
_stackHorizontal() {
|
||||
const sorted = []
|
||||
@ -2037,7 +2043,7 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
_stackVertical() {
|
||||
const sorted = []
|
||||
@ -2097,7 +2103,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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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 09:51:15 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 10:17:52 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
@ -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>
|
||||
|
@ -42,8 +42,8 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
* or a Theme object.
|
||||
* @param {number} [opts.minWidth=44] - Button: The minimum width of one button.
|
||||
* @param {number} [opts.minHeight=44] - Button: The minimum height of one button.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero.
|
||||
* @param {number} [opts.maxWidth] - The maximum width of the button group. If the buttons are wider than the maximum width, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.maxHeight] - The maximum height of the button group. If the buttons are higher than the maximum height, the buttons get stacked. Note: The buttons can only be stacked if margin is not zero. Note 2: Load the Greensock ThrowPropsPlugin for smoother animations.
|
||||
* @param {number} [opts.stackPadding=10] - The padding for stacked buttons.
|
||||
* @param {PIXI.Application} [opts.app] - The PixiJS Application. Must be set if you want to use the mousewheel to scroll your button group. Only used when the buttons are stacked (with maxWidth or maxHeight).
|
||||
* @param {number} [opts.padding=Theme.padding] - Button: The inner spacing (distance from icon and/or label) the the border.
|
||||
@ -456,27 +456,27 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
|
||||
this.capture(event)
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } }
|
||||
const throwProps = { x: { velocity: 'auto' }, y: { velocity: 'auto' } }
|
||||
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height
|
||||
}
|
||||
if (this.opts.orientation === 'horizontal') {
|
||||
const distanceToLeft = this.container.x
|
||||
const distanceToRight = this.opts.maxWidth - this.container.x - this.__initWidth
|
||||
if (distanceToLeft > 0 && distanceToLeft > distanceToRight) {
|
||||
throwProps.x.end = 0
|
||||
} else if (distanceToRight > 0 && distanceToRight > distanceToLeft) {
|
||||
throwProps.x.end = this.opts.maxWidth - this.__initWidth
|
||||
}
|
||||
} else {
|
||||
const distanceToTop = this.container.y
|
||||
const distanceToBottom = this.opts.maxHeight - this.container.y - this.container.height
|
||||
if (distanceToTop > 0 && distanceToTop > distanceToBottom) {
|
||||
throwProps.y.end = 0
|
||||
} else if (distanceToBottom > 0 && distanceToBottom > distanceToTop) {
|
||||
throwProps.y.end = this.opts.maxHeight - this.container.height
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof ThrowPropsPlugin != 'undefined') {
|
||||
ThrowPropsPlugin.to(
|
||||
this.container.position,
|
||||
{
|
||||
@ -488,6 +488,12 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
0.8,
|
||||
0.4
|
||||
)
|
||||
} else {
|
||||
if (this.opts.orientation === 'horizontal' && throwProps.x.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { x: throwProps.x.end, onUpdate: this.stack.bind(this) })
|
||||
} else if (this.opts.orientation === 'vertical' && throwProps.y.end != null) {
|
||||
TweenMax.to(this.container.position, 0.3, { y: throwProps.y.end, onUpdate: this.stack.bind(this) })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user