perfect-gui 4.0.6 → 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 +1 -1
- package/src/index.js +5 -1
- package/src/styles.js +8 -8
package/package.json
CHANGED
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:
|
|
643
|
+
inline: container_style,
|
|
640
644
|
});
|
|
641
645
|
|
|
642
646
|
let folderHeader = this._createElement({
|
package/src/styles.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* depending on a css loader
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export default function( position_type ) {
|
|
6
|
+
export default function( position_type ) {
|
|
7
7
|
return /* css */`
|
|
8
8
|
.p-gui {
|
|
9
9
|
position: ${ position_type };
|
|
@@ -26,6 +26,10 @@ return /* css */`
|
|
|
26
26
|
border-bottom-left-radius: 3px;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.p-gui * {
|
|
30
|
+
font-size: 11px;
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
.p-gui--collapsed {
|
|
30
34
|
height: 0;
|
|
31
35
|
padding: 21px 10px 0 10px;
|
|
@@ -87,7 +91,6 @@ return /* css */`
|
|
|
87
91
|
position: absolute;
|
|
88
92
|
bottom: -15px;
|
|
89
93
|
color: #eee;
|
|
90
|
-
font-size: 11px;
|
|
91
94
|
text-shadow: 0 -1px 0 #111;
|
|
92
95
|
white-space: nowrap;
|
|
93
96
|
width: 100%;
|
|
@@ -102,7 +105,6 @@ return /* css */`
|
|
|
102
105
|
.p-gui__color {
|
|
103
106
|
width: 100%;
|
|
104
107
|
padding: 7px;
|
|
105
|
-
font-size: 11px;
|
|
106
108
|
color: white;
|
|
107
109
|
border-bottom: 1px solid #00ff89;
|
|
108
110
|
cursor: pointer;
|
|
@@ -236,17 +238,16 @@ return /* css */`
|
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
.p-gui__color-picker::-webkit-color-swatch-wrapper {
|
|
239
|
-
|
|
241
|
+
padding: 0;
|
|
240
242
|
}
|
|
241
243
|
.p-gui__color-picker::-webkit-color-swatch {
|
|
242
|
-
|
|
244
|
+
border: none;
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
.p-gui__slider {
|
|
246
248
|
width: 100%;
|
|
247
249
|
margin-bottom: 8px;
|
|
248
250
|
padding: 7px;
|
|
249
|
-
font-size: 11px;
|
|
250
251
|
color: white;
|
|
251
252
|
position: relative;
|
|
252
253
|
min-height: 14px;
|
|
@@ -300,7 +301,7 @@ return /* css */`
|
|
|
300
301
|
width: 100%;
|
|
301
302
|
position: relative;
|
|
302
303
|
background: #434343;
|
|
303
|
-
overflow:
|
|
304
|
+
overflow: auto;
|
|
304
305
|
margin-bottom: 3px;
|
|
305
306
|
display: flex;
|
|
306
307
|
flex-wrap: wrap;
|
|
@@ -318,7 +319,6 @@ return /* css */`
|
|
|
318
319
|
|
|
319
320
|
.p-gui__folder-header {
|
|
320
321
|
padding: 5px;
|
|
321
|
-
font-size: 11px;
|
|
322
322
|
background-color: rgba(0, 0, 0, .5);
|
|
323
323
|
color: white;
|
|
324
324
|
cursor: pointer;
|