perfect-gui 4.0.7 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perfect-gui",
3
- "version": "4.0.7",
3
+ "version": "4.1.0",
4
4
  "description": "Nice and simple GUI for JavaScript",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -621,6 +621,7 @@ export default class GUI {
621
621
  let closed = typeof options.closed == 'boolean' ? options.closed : false;
622
622
  let name = options.name || '';
623
623
  let color = options.color || null;
624
+ let maxHeight = options.maxHeight || null;
624
625
 
625
626
  this.imageContainer = null;
626
627
 
@@ -633,10 +634,13 @@ export default class GUI {
633
634
  if (closed) {
634
635
  className += ' p-gui__folder--closed';
635
636
  }
637
+
638
+ let container_style = color ? `background-color: ${color};` : '';
639
+ container_style += maxHeight ? `max-height: ${maxHeight}px;` : '';
636
640
 
637
641
  let container = this._createElement({
638
642
  class: className,
639
- inline: color ? `background-color: ${color};`: null,
643
+ inline: container_style,
640
644
  });
641
645
 
642
646
  let folderHeader = this._createElement({
package/src/styles.js CHANGED
@@ -301,7 +301,7 @@ return /* css */`
301
301
  width: 100%;
302
302
  position: relative;
303
303
  background: #434343;
304
- overflow: hidden;
304
+ overflow: auto;
305
305
  margin-bottom: 3px;
306
306
  display: flex;
307
307
  flex-wrap: wrap;