From e8a64fb014cc065b2558c6a8c76b0490da7baa58 Mon Sep 17 00:00:00 2001 From: Sebastian Kupke Date: Fri, 2 Aug 2019 10:15:49 +0200 Subject: [PATCH] Added getter and setter for maxWidth and maxHeight for button groups. --- dist/iwmlib.js | 16 --- dist/iwmlib.pixi.js | 32 ++++- doc/out/AbstractPopup.html | 6 +- doc/out/Badge.html | 6 +- doc/out/BlurFilter.html | 6 +- doc/out/Button.html | 12 +- doc/out/ButtonGroup.html | 120 +++++++++++++++++- doc/out/DeepZoomImage.html | 6 +- doc/out/DeepZoomInfo.html | 6 +- doc/out/Flippable.html | 6 +- doc/out/FontInfo.html | 6 +- doc/out/Hypenate.html | 6 +- doc/out/InteractivePopup.html | 6 +- ...beledGraphics.exports.LabeledGraphics.html | 6 +- doc/out/LabeledGraphics.html | 6 +- doc/out/List.html | 6 +- doc/out/Message.html | 6 +- doc/out/MessageInteractivePopup.html | 6 +- doc/out/MessageMessageInteractivePopup.html | 6 +- doc/out/Modal.html | 6 +- doc/out/ModalInteractivePopup.html | 6 +- doc/out/ModalModalInteractivePopup.html | 6 +- doc/out/PIXIApp.html | 6 +- doc/out/Popup.html | 6 +- doc/out/PopupInteractivePopup.html | 6 +- doc/out/PopupMenu.html | 6 +- doc/out/PopupMenuPopupInteractivePopup.html | 6 +- ...pupMenuPopupMenuPopupInteractivePopup.html | 6 +- ...nuPopupMenuPopupPopupInteractivePopup.html | 6 +- .../PopupMenuPopupPopupInteractivePopup.html | 6 +- doc/out/PopupPopupInteractivePopup.html | 6 +- doc/out/Progress.html | 6 +- doc/out/Scrollview.html | 6 +- doc/out/Slider.html | 6 +- doc/out/Switch.html | 6 +- doc/out/TextLabel.TextLabel.html | 6 +- doc/out/Theme.html | 6 +- doc/out/ThemeDark.html | 6 +- doc/out/ThemeLight.html | 6 +- doc/out/ThemeRed.html | 6 +- doc/out/TileQuadNode.html | 6 +- doc/out/Tooltip.html | 6 +- doc/out/UITest.html | 6 +- doc/out/Volatile.html | 6 +- doc/out/global.html | 6 +- doc/out/index.html | 6 +- doc/out/pixi_abstractpopup.js.html | 6 +- doc/out/pixi_app.js.html | 6 +- doc/out/pixi_badge.js.html | 6 +- doc/out/pixi_blurfilter.js.html | 6 +- doc/out/pixi_button.js.html | 26 ++-- doc/out/pixi_buttongroup.js.html | 34 ++++- doc/out/pixi_deepzoom_image.js.html | 6 +- doc/out/pixi_flippable.js.html | 6 +- doc/out/pixi_labeledgraphics.js.html | 6 +- doc/out/pixi_list.js.html | 6 +- doc/out/pixi_message.js.html | 6 +- doc/out/pixi_modal.js.html | 6 +- doc/out/pixi_popup.js.html | 6 +- doc/out/pixi_popupmenu.js.html | 6 +- doc/out/pixi_progress.js.html | 6 +- doc/out/pixi_scrollview.js.html | 6 +- doc/out/pixi_slider.js.html | 6 +- doc/out/pixi_switch.js.html | 6 +- doc/out/pixi_theme.js.html | 6 +- doc/out/pixi_tooltip.js.html | 6 +- doc/out/pixi_volatile.js.html | 6 +- doc/out/uitest.js.html | 6 +- lib/card/card.js | 18 ++- lib/pixi/button.js | 24 ++-- lib/pixi/buttongroup.js | 28 ++++ 71 files changed, 558 insertions(+), 124 deletions(-) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 414e534..9be616d 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -2480,8 +2480,6 @@ onMouseWheel(event) { if (this.capture(event) && this.target.onMouseWheel) { this.target.onMouseWheel(event); - } else { - //console.warn('Target has no onMouseWheel callback') } } @@ -2685,8 +2683,6 @@ } if (this.target.onMouseWheel) { this.target.onMouseWheel(event); - } else { - //console.warn('Target has no onMouseWheel callback', this.target) } } } @@ -7609,8 +7605,6 @@ /** To avoid problems with relative URL paths, we use inline data URI to load svg icons. */ - const enableNearestNeighborTaps = false; - /** * A class that collects static methods to maintain the states and parts of * EyeVisit like cards. @@ -9015,16 +9009,6 @@ if (this.dynamicHeight) { article.appendChild(iconClone); } - - if (enableNearestNeighborTaps) { - //look for nearby popups on tap - InteractionMapper.on('tap', indexbox, () => { - console.log('Tap handler called', editable); - if (!editable) { - this.findNearbyPopups(event, card); - } - }); - } // Use the 'tap' event for closing. // Otherwise the subcard cannot be closed, // when another subcard is touched. diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index ed5fc52..df57b22 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -3298,6 +3298,34 @@ 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. * @@ -6035,8 +6063,6 @@ onMouseWheel(event) { if (this.capture(event) && this.target.onMouseWheel) { this.target.onMouseWheel(event); - } else { - //console.warn('Target has no onMouseWheel callback') } } @@ -6240,8 +6266,6 @@ } if (this.target.onMouseWheel) { this.target.onMouseWheel(event); - } else { - //console.warn('Target has no onMouseWheel callback', this.target) } } } diff --git a/doc/out/AbstractPopup.html b/doc/out/AbstractPopup.html index 65a3bce..aec30eb 100644 --- a/doc/out/AbstractPopup.html +++ b/doc/out/AbstractPopup.html @@ -252,6 +252,10 @@
  • disabled
  • +
  • maxHeight
  • + +
  • maxWidth
  • +