Added getter and setter for maxWidth and maxHeight for button groups.
This commit is contained in:
@@ -252,6 +252,10 @@
|
||||
|
||||
<li class="parent " data-name="ButtonGroup#disabled"><a href="ButtonGroup.html#disabled">disabled</a></li>
|
||||
|
||||
<li class="parent " data-name="ButtonGroup#maxHeight"><a href="ButtonGroup.html#maxHeight">maxHeight</a></li>
|
||||
|
||||
<li class="parent " data-name="ButtonGroup#maxWidth"><a href="ButtonGroup.html#maxWidth">maxWidth</a></li>
|
||||
|
||||
</ul>
|
||||
<ul class="typedefs itemMembers">
|
||||
|
||||
@@ -1819,6 +1823,34 @@ export default class ButtonGroup extends PIXI.Container {
|
||||
this.buttons.forEach(it => (it.disabled = value))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or sets the maximum width of the button group for stacking. Usefull when you want to resize the available space.
|
||||
*
|
||||
* @member {number}
|
||||
*/
|
||||
get maxWidth() {
|
||||
return this.opts.maxWidth
|
||||
}
|
||||
|
||||
set maxWidth(value) {
|
||||
this.opts.maxWidth = value
|
||||
this.layout()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or sets the maximum height of the button group for stacking. Usefull when you want to resize the available space.
|
||||
*
|
||||
* @member {number}
|
||||
*/
|
||||
get maxHeight() {
|
||||
return this.opts.maxHeight
|
||||
}
|
||||
|
||||
set maxHeight(value) {
|
||||
this.opts.maxHeight = value
|
||||
this.layout()
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches all buttons of the button group and returns the maximum width of one button.
|
||||
*
|
||||
@@ -2121,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 Thu Aug 01 2019 11:26:03 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Fri Aug 02 2019 10:15:07 GMT+0200 (Mitteleuropäische Sommerzeit)
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user