uil 4.2.1 → 4.2.2
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/build/uil.js +202 -109
- package/build/uil.min.js +1 -1
- package/build/uil.module.js +199 -94
- package/package.json +1 -1
package/build/uil.js
CHANGED
|
@@ -724,8 +724,8 @@
|
|
|
724
724
|
|
|
725
725
|
if (o.fontSelect) color.textSelect = o.fontSelect;
|
|
726
726
|
if (o.groupBorder) color.gborder = o.groupBorder;
|
|
727
|
-
if (o.transparent) o.bg = 'none';
|
|
728
|
-
|
|
727
|
+
if (o.transparent) o.bg = 'none'; //if( o.bg ) color.background = color.backgroundOver = o.bg
|
|
728
|
+
|
|
729
729
|
if (o.bgOver) color.backgroundOver = o.bgOver;
|
|
730
730
|
|
|
731
731
|
for (let m in color) {
|
|
@@ -740,6 +740,8 @@
|
|
|
740
740
|
return color;
|
|
741
741
|
},
|
|
742
742
|
colors: {
|
|
743
|
+
sx: 3,
|
|
744
|
+
sy: 3,
|
|
743
745
|
content: 'none',
|
|
744
746
|
background: 'rgba(50,50,50,0.3)',
|
|
745
747
|
backgroundOver: 'rgba(50,50,50,0.4)',
|
|
@@ -757,26 +759,28 @@
|
|
|
757
759
|
border: '#4c4c4c',
|
|
758
760
|
borderSize: 1,
|
|
759
761
|
gborder: 'none',
|
|
762
|
+
groups: 'none',
|
|
760
763
|
button: '#3c3c3c',
|
|
761
764
|
overoff: '#5c5c5c',
|
|
762
765
|
over: '#024699',
|
|
763
766
|
select: '#308AFF',
|
|
764
767
|
action: '#FF3300',
|
|
765
768
|
//fontFamily: 'Tahoma',
|
|
766
|
-
fontFamily: 'Consolas,
|
|
769
|
+
fontFamily: 'Consolas, monospace',
|
|
767
770
|
//fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
|
|
768
771
|
fontWeight: 'normal',
|
|
769
772
|
fontShadow: 'none',
|
|
770
773
|
//'#000',
|
|
771
774
|
fontSize: 12,
|
|
772
|
-
radius:
|
|
775
|
+
radius: 3,
|
|
773
776
|
hide: 'rgba(0,0,0,0)'
|
|
774
777
|
},
|
|
775
778
|
// style css
|
|
776
779
|
css: {
|
|
777
780
|
//unselect: '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
|
|
778
781
|
basic: 'position:absolute; pointer-events:none; box-sizing:border-box; margin:0; padding:0; overflow:hidden; ' + '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
|
|
779
|
-
button: 'display:flex; justify-content:center; align-items:center; text-align:center;'
|
|
782
|
+
button: 'display:flex; justify-content:center; align-items:center; text-align:center;',
|
|
783
|
+
middle: 'display:flex; align-items:center;'
|
|
780
784
|
/*txt: T.css.basic + 'font-family:'+ T.colors.fontFamily +'; font-size:'+T.colors.fontSize+'px; color:'+T.colors.text+'; padding:2px 10px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap;',
|
|
781
785
|
txtselect: T.css.txt + 'display:flex; justify-content:left; align-items:center; text-align:left;' +'padding:2px 5px; border:1px dashed ' + T.colors.border + '; background:'+ T.colors.txtselectbg+';',
|
|
782
786
|
item: T.css.txt + 'position:relative; background:rgba(0,0,0,0.2); margin-bottom:1px;',*/
|
|
@@ -784,6 +788,8 @@
|
|
|
784
788
|
},
|
|
785
789
|
// svg path
|
|
786
790
|
svgs: {
|
|
791
|
+
g1: 'M 6 4 L 0 4 0 6 6 6 6 4 M 6 0 L 0 0 0 2 6 2 6 0 Z',
|
|
792
|
+
g2: 'M 6 0 L 4 0 4 6 6 6 6 0 M 2 0 L 0 0 0 6 2 6 2 0 Z',
|
|
787
793
|
group: 'M 7 7 L 7 8 8 8 8 7 7 7 M 5 7 L 5 8 6 8 6 7 5 7 M 3 7 L 3 8 4 8 4 7 3 7 M 7 5 L 7 6 8 6 8 5 7 5 M 6 6 L 6 5 5 5 5 6 6 6 M 7 3 L 7 4 8 4 8 3 7 3 M 6 4 L 6 3 5 3 5 4 6 4 M 3 5 L 3 6 4 6 4 5 3 5 M 3 3 L 3 4 4 4 4 3 3 3 Z',
|
|
788
794
|
arrow: 'M 3 8 L 8 5 3 2 3 8 Z',
|
|
789
795
|
arrowDown: 'M 5 8 L 8 3 2 3 5 8 Z',
|
|
@@ -839,7 +845,7 @@
|
|
|
839
845
|
} else size += 'px';
|
|
840
846
|
|
|
841
847
|
let align = 'display:flex; justify-content:left; align-items:center; text-align:left;';
|
|
842
|
-
T.css.txt = T.css.basic + align + ' font-family:' + font + '; font-weight:' + weight + '; font-size:' + size + '; color:' + cc.text + '; padding:0px
|
|
848
|
+
T.css.txt = T.css.basic + align + ' font-family:' + font + '; font-weight:' + weight + '; font-size:' + size + '; color:' + cc.text + '; padding:0px 8px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap; letter-spacing: normal;';
|
|
843
849
|
if (shadow !== 'none') T.css.txt += ' text-shadow: 1px 1px 1px ' + shadow + ';';
|
|
844
850
|
T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';'; //T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; '//display:block; padding:4px 4px;';//
|
|
845
851
|
|
|
@@ -1598,6 +1604,40 @@
|
|
|
1598
1604
|
}];
|
|
1599
1605
|
break;
|
|
1600
1606
|
|
|
1607
|
+
case 'wav':
|
|
1608
|
+
t = [{
|
|
1609
|
+
accept: {
|
|
1610
|
+
'audio/wav': '.wav'
|
|
1611
|
+
}
|
|
1612
|
+
}];
|
|
1613
|
+
break;
|
|
1614
|
+
|
|
1615
|
+
case 'mp3':
|
|
1616
|
+
t = [{
|
|
1617
|
+
accept: {
|
|
1618
|
+
'audio/mpeg': '.mp3'
|
|
1619
|
+
}
|
|
1620
|
+
}];
|
|
1621
|
+
break;
|
|
1622
|
+
|
|
1623
|
+
case 'mp4':
|
|
1624
|
+
t = [{
|
|
1625
|
+
accept: {
|
|
1626
|
+
'video/mp4': '.mp4'
|
|
1627
|
+
}
|
|
1628
|
+
}];
|
|
1629
|
+
break;
|
|
1630
|
+
|
|
1631
|
+
case 'bin':
|
|
1632
|
+
case 'hex':
|
|
1633
|
+
t = [{
|
|
1634
|
+
description: 'Binary Files',
|
|
1635
|
+
accept: {
|
|
1636
|
+
'application/octet-stream': ['.bin', '.hex']
|
|
1637
|
+
}
|
|
1638
|
+
}];
|
|
1639
|
+
break;
|
|
1640
|
+
|
|
1601
1641
|
case 'text':
|
|
1602
1642
|
t = [{
|
|
1603
1643
|
description: 'Text Files',
|
|
@@ -1612,7 +1652,17 @@
|
|
|
1612
1652
|
t = [{
|
|
1613
1653
|
description: 'JSON Files',
|
|
1614
1654
|
accept: {
|
|
1615
|
-
'
|
|
1655
|
+
'application/json': ['.json']
|
|
1656
|
+
}
|
|
1657
|
+
}]; //text/plain
|
|
1658
|
+
|
|
1659
|
+
break;
|
|
1660
|
+
|
|
1661
|
+
case 'js':
|
|
1662
|
+
t = [{
|
|
1663
|
+
description: 'JavaScript Files',
|
|
1664
|
+
accept: {
|
|
1665
|
+
'text/javascript': ['.js']
|
|
1616
1666
|
}
|
|
1617
1667
|
}];
|
|
1618
1668
|
break;
|
|
@@ -1919,7 +1969,7 @@
|
|
|
1919
1969
|
this.fw = o.fw || 0;
|
|
1920
1970
|
this.autoWidth = o.auto || true; // auto width or flex
|
|
1921
1971
|
|
|
1922
|
-
this.isOpen = false; // open statu
|
|
1972
|
+
this.isOpen = false; //false// open statu
|
|
1923
1973
|
// radius for toolbox
|
|
1924
1974
|
|
|
1925
1975
|
this.radius = o.radius || this.colors.radius;
|
|
@@ -1978,13 +2028,14 @@
|
|
|
1978
2028
|
this.s[0].borderTop = this.margin * 0.5 + 'px solid transparent';
|
|
1979
2029
|
this.s[0].borderBottom = this.margin * 0.5 + 'px solid transparent';
|
|
1980
2030
|
} else {
|
|
2031
|
+
//this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent'
|
|
1981
2032
|
this.s[0].borderBottom = this.margin + 'px solid transparent';
|
|
1982
2033
|
}
|
|
1983
2034
|
} // with title
|
|
1984
2035
|
|
|
1985
2036
|
|
|
1986
2037
|
if (!this.simple) {
|
|
1987
|
-
this.c[1] = Tools.dom('div', this.css.txt);
|
|
2038
|
+
this.c[1] = Tools.dom('div', this.css.txt + this.css.middle);
|
|
1988
2039
|
this.s[1] = this.c[1].style;
|
|
1989
2040
|
this.c[1].textContent = this.name;
|
|
1990
2041
|
this.s[1].color = this.lock ? this.colors.titleoff : this.colors.title;
|
|
@@ -2027,8 +2078,9 @@
|
|
|
2027
2078
|
|
|
2028
2079
|
if (c[1] !== undefined && this.autoWidth) {
|
|
2029
2080
|
s[1] = c[1].style;
|
|
2030
|
-
s[1].
|
|
2031
|
-
s[1].
|
|
2081
|
+
s[1].top = 1 + 'px';
|
|
2082
|
+
s[1].height = this.h - 2 + 'px'; //s[1].height = (this.h-4) + 'px';
|
|
2083
|
+
// s[1].lineHeight = (this.h-8) + 'px';
|
|
2032
2084
|
}
|
|
2033
2085
|
|
|
2034
2086
|
let frag = Tools.frag;
|
|
@@ -2235,9 +2287,11 @@
|
|
|
2235
2287
|
if (this.simple) {
|
|
2236
2288
|
this.sb = this.w - this.sa;
|
|
2237
2289
|
} else {
|
|
2238
|
-
let pp = this.w * (this.p / 100);
|
|
2239
|
-
this.
|
|
2240
|
-
|
|
2290
|
+
let pp = this.w * (this.p / 100); //this.sa = Math.floor( pp + 10 )
|
|
2291
|
+
//this.sb = Math.floor( this.w - pp - 20 )
|
|
2292
|
+
|
|
2293
|
+
this.sa = Math.floor(pp + 8);
|
|
2294
|
+
this.sb = Math.floor(this.w - pp - 16);
|
|
2241
2295
|
}
|
|
2242
2296
|
}
|
|
2243
2297
|
|
|
@@ -2545,6 +2599,7 @@
|
|
|
2545
2599
|
this.value = o.value || '';
|
|
2546
2600
|
this.values = o.value || this.txt;
|
|
2547
2601
|
if (o.values) this.values = o.values;
|
|
2602
|
+
if (!o.values && !o.value) this.txt = '';
|
|
2548
2603
|
this.onName = o.onName || null;
|
|
2549
2604
|
this.on = false; // force button width
|
|
2550
2605
|
|
|
@@ -2577,7 +2632,7 @@
|
|
|
2577
2632
|
}
|
|
2578
2633
|
}
|
|
2579
2634
|
|
|
2580
|
-
if (
|
|
2635
|
+
if (this.txt === '') this.p = 0;
|
|
2581
2636
|
this.init();
|
|
2582
2637
|
}
|
|
2583
2638
|
|
|
@@ -2723,16 +2778,20 @@
|
|
|
2723
2778
|
let w = this.sb;
|
|
2724
2779
|
let d = this.sa;
|
|
2725
2780
|
let i = this.lng;
|
|
2726
|
-
let
|
|
2727
|
-
let size = Math.floor((w
|
|
2781
|
+
let sx = this.colors.sx; //this.space;
|
|
2782
|
+
//let size = Math.floor( ( w-(dc*(i-1)) ) / i );
|
|
2783
|
+
|
|
2784
|
+
let size = (w - sx * (i - 1)) / i;
|
|
2728
2785
|
|
|
2729
2786
|
if (this.bw) {
|
|
2730
|
-
size = this.bw < size ? this.bw : size;
|
|
2731
|
-
|
|
2787
|
+
size = this.bw < size ? this.bw : size; //d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5)
|
|
2788
|
+
|
|
2789
|
+
d = (this.w - (size * i + sx * (i - 1))) * 0.5;
|
|
2732
2790
|
}
|
|
2733
2791
|
|
|
2734
2792
|
while (i--) {
|
|
2735
|
-
this.tmp[i] = [Math.floor(d + size * i + dc * i), size];
|
|
2793
|
+
//this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
|
|
2794
|
+
this.tmp[i] = [d + size * i + sx * i, size];
|
|
2736
2795
|
this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
|
|
2737
2796
|
s[i + 2].left = this.tmp[i][0] + 'px';
|
|
2738
2797
|
s[i + 2].width = this.tmp[i][1] + 'px';
|
|
@@ -3252,11 +3311,13 @@
|
|
|
3252
3311
|
this.txt = o.name || 'Fps';
|
|
3253
3312
|
}
|
|
3254
3313
|
|
|
3255
|
-
let fltop = Math.floor(this.h * 0.5) -
|
|
3256
|
-
|
|
3314
|
+
let fltop = Math.floor(this.h * 0.5) - 3;
|
|
3315
|
+
const ccc = this.colors;
|
|
3316
|
+
this.c[1].textContent = this.txt; //this.c[1].innerHTML = ' ' + this.txt
|
|
3317
|
+
|
|
3257
3318
|
this.c[0].style.cursor = 'pointer';
|
|
3258
3319
|
this.c[0].style.pointerEvents = 'auto';
|
|
3259
|
-
let panelCss = 'display:none; left:10px; top:' + this.h + 'px; height:' + (this.hplus - 8) + 'px; box-sizing:border-box; background: rgba(0, 0, 0, 0.2); border:1px solid ' +
|
|
3320
|
+
let panelCss = 'display:none; left:10px; top:' + this.h + 'px; height:' + (this.hplus - 8) + 'px; box-sizing:border-box; background: rgba(0, 0, 0, 0.2); border:1px solid ' + ccc.border + ';';
|
|
3260
3321
|
if (this.radius !== 0) panelCss += 'border-radius:' + this.radius + 'px;';
|
|
3261
3322
|
this.c[2] = this.dom('path', this.css.basic + panelCss, {});
|
|
3262
3323
|
this.c[2].setAttribute('viewBox', '0 0 ' + this.res + ' 50');
|
|
@@ -3266,23 +3327,25 @@
|
|
|
3266
3327
|
//this.dom( 'path', null, { fill:'rgba(0,255,255,0.3)', 'stroke-width':1, stroke:'#0FF', 'vector-effect':'non-scaling-stroke' }, this.c[2] );
|
|
3267
3328
|
// arrow
|
|
3268
3329
|
|
|
3269
|
-
this.c[3] = this.dom('path', this.css.basic + 'position:absolute; width:
|
|
3270
|
-
d: this.svgs.
|
|
3271
|
-
fill:
|
|
3330
|
+
this.c[3] = this.dom('path', this.css.basic + 'position:absolute; width:6px; height:6px; left:0; top:' + fltop + 'px;', {
|
|
3331
|
+
d: this.svgs.g1,
|
|
3332
|
+
fill: ccc.text,
|
|
3272
3333
|
stroke: 'none'
|
|
3273
|
-
}); //
|
|
3334
|
+
}); //this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; left:4px; top:'+fltop+'px;', { d:this.svgs.arrow, fill:this.colors.text, stroke:'none'});
|
|
3335
|
+
// result test
|
|
3274
3336
|
|
|
3275
3337
|
this.c[4] = this.dom('div', this.css.txt + 'position:absolute; left:10px; top:' + (this.h + 2) + 'px; display:none; width:100%; text-align:center;'); // bottom line
|
|
3276
3338
|
|
|
3277
3339
|
if (o.bottomLine) this.c[4] = this.dom('div', this.css.basic + 'width:100%; bottom:0px; height:1px; background: rgba(255, 255, 255, 0.2);');
|
|
3278
3340
|
this.isShow = false;
|
|
3279
|
-
let s = this.s;
|
|
3280
|
-
|
|
3341
|
+
let s = this.s; //s[1].marginLeft = '10px';
|
|
3342
|
+
|
|
3281
3343
|
s[1].lineHeight = this.h - 4;
|
|
3282
|
-
s[1].color =
|
|
3344
|
+
s[1].color = ccc.text; //s[1].paddingLeft = '18px';
|
|
3345
|
+
//s[1].fontWeight = 'bold';
|
|
3283
3346
|
|
|
3284
3347
|
if (this.radius !== 0) s[0].borderRadius = this.radius + 'px';
|
|
3285
|
-
if (this.colors.gborder !== 'none') s[0].border = '1px solid ' +
|
|
3348
|
+
if (this.colors.gborder !== 'none') s[0].border = '1px solid ' + ccc.gborder;
|
|
3286
3349
|
let j = 0;
|
|
3287
3350
|
|
|
3288
3351
|
for (j = 0; j < this.names.length; j++) {
|
|
@@ -3386,7 +3449,7 @@
|
|
|
3386
3449
|
open() {
|
|
3387
3450
|
super.open();
|
|
3388
3451
|
this.h = this.hplus + this.baseH;
|
|
3389
|
-
this.setSvg(this.c[3], 'd', this.svgs.
|
|
3452
|
+
this.setSvg(this.c[3], 'd', this.svgs.g2);
|
|
3390
3453
|
|
|
3391
3454
|
if (this.group !== null) {
|
|
3392
3455
|
this.group.calc(this.hplus);
|
|
@@ -3402,7 +3465,7 @@
|
|
|
3402
3465
|
close() {
|
|
3403
3466
|
super.close();
|
|
3404
3467
|
this.h = this.baseH;
|
|
3405
|
-
this.setSvg(this.c[3], 'd', this.svgs.
|
|
3468
|
+
this.setSvg(this.c[3], 'd', this.svgs.g1);
|
|
3406
3469
|
|
|
3407
3470
|
if (this.group !== null) {
|
|
3408
3471
|
this.group.calc(-this.hplus);
|
|
@@ -3452,6 +3515,7 @@
|
|
|
3452
3515
|
rSize() {
|
|
3453
3516
|
let s = this.s;
|
|
3454
3517
|
let w = this.w;
|
|
3518
|
+
s[3].left = this.sa + this.sb - 6 + 'px';
|
|
3455
3519
|
s[0].width = w + 'px';
|
|
3456
3520
|
s[1].width = w + 'px';
|
|
3457
3521
|
s[2].left = 10 + 'px';
|
|
@@ -3747,45 +3811,65 @@
|
|
|
3747
3811
|
this.current = -1;
|
|
3748
3812
|
this.proto = null;
|
|
3749
3813
|
this.isEmpty = true;
|
|
3750
|
-
this.decal = 0;
|
|
3814
|
+
this.decal = o.group ? 8 : 0;
|
|
3751
3815
|
this.baseH = this.h;
|
|
3752
|
-
let fltop = Math.floor(this.h * 0.5) -
|
|
3816
|
+
let fltop = Math.floor(this.h * 0.5) - 3;
|
|
3817
|
+
const cc = this.colors;
|
|
3753
3818
|
this.isLine = o.line !== undefined ? o.line : false;
|
|
3754
|
-
this.decal = 0;
|
|
3755
|
-
|
|
3756
|
-
if (o.group) {
|
|
3757
|
-
this.decal = o.group.decal ? o.group.decal : 0;
|
|
3758
|
-
this.decal += 6;
|
|
3759
|
-
}
|
|
3760
|
-
|
|
3761
3819
|
this.useFlex = true;
|
|
3762
3820
|
let flexible = this.useFlex ? 'display:flex; flex-flow: row wrap;' : '';
|
|
3763
|
-
this.c[2] = this.dom('div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:' + this.h + 'px');
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
fill: this.colors.text,
|
|
3768
|
-
stroke: 'none'
|
|
3769
|
-
});
|
|
3770
|
-
this.c[4] = this.dom('path', this.css.basic + 'position:absolute; width:10px; height:10px; left:' + (4 + this.decal) + 'px; top:' + fltop + 'px;', {
|
|
3771
|
-
d: this.svgs.arrow,
|
|
3772
|
-
fill: this.colors.text,
|
|
3821
|
+
this.c[2] = this.dom('div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:' + (this.h - 1) + 'px');
|
|
3822
|
+
this.c[3] = this.dom('path', this.css.basic + 'position:absolute; width:6px; height:6px; left:0; top:' + fltop + 'px;', {
|
|
3823
|
+
d: this.svgs.g1,
|
|
3824
|
+
fill: cc.text,
|
|
3773
3825
|
stroke: 'none'
|
|
3774
|
-
}); //
|
|
3826
|
+
}); //this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; left:0; top:'+fltop+'px;', { d:this.svgs.group, fill:cc.text, stroke:'none'})
|
|
3827
|
+
//this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; left:0; top:'+fltop+'px;', { d:this.svgs.group, fill:cc.text, stroke:'none'})
|
|
3828
|
+
//this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; left:'+(this.decal-1)+'px; top:'+fltop+'px;', { d:this.svgs.arrow, fill:cc.text, stroke:'none'})
|
|
3829
|
+
// bottom line
|
|
3830
|
+
|
|
3831
|
+
if (this.isLine) this.c[5] = this.dom('div', this.css.basic + 'background:rgba(255, 255, 255, 0.2); width:100%; left:0; height:1px; bottom:0px'); //else this.c[5] = this.dom( 'div', this.css.basic + 'width:100%; left:0; height:auto; top:'+(this.h-1)+'px')
|
|
3775
3832
|
|
|
3776
|
-
if (this.isLine) this.c[5] = this.dom('div', this.css.basic + 'background:rgba(255, 255, 255, 0.2); width:100%; left:0; height:1px; bottom:0px');
|
|
3777
3833
|
let s = this.s;
|
|
3778
3834
|
s[0].height = this.h + 'px';
|
|
3779
|
-
s[1].height = this.h + 'px';
|
|
3780
3835
|
this.c[1].name = 'group';
|
|
3781
|
-
|
|
3836
|
+
|
|
3837
|
+
if (cc.groups !== 'none') {
|
|
3838
|
+
s[1].background = cc.groups;
|
|
3839
|
+
s[1].border = cc.borderSize + 'px solid ' + cc.border;
|
|
3840
|
+
s[1].borderRadius = this.radius + 'px'; //s[5].border = '2px solid ' + '#000'
|
|
3841
|
+
//s[1].marginRight = 10+'px';
|
|
3842
|
+
} //this.c[1].innerHTML = this.dd + this.name
|
|
3843
|
+
//s[1].padding = '0px ' + (10+this.decal)+'px';
|
|
3844
|
+
|
|
3845
|
+
|
|
3782
3846
|
s[1].lineHeight = this.h - 4;
|
|
3783
|
-
s[1].color =
|
|
3847
|
+
s[1].color = cc.text; //s[1].fontWeight = 'bold';
|
|
3784
3848
|
|
|
3785
|
-
if (this.radius !== 0) s[0].borderRadius = this.radius + 'px';
|
|
3786
3849
|
this.init();
|
|
3850
|
+
|
|
3851
|
+
if (this.radius !== 0) {
|
|
3852
|
+
//s[0].borderRadius = this.radius+'px'
|
|
3853
|
+
s[1].borderRadius = this.radius + 'px';
|
|
3854
|
+
s[2].borderRadius = this.radius + 'px';
|
|
3855
|
+
} //s[1].paddingLeft = (10+this.decal)+'px'
|
|
3856
|
+
|
|
3857
|
+
|
|
3787
3858
|
this.setBG(o.bg);
|
|
3788
|
-
if (o.open
|
|
3859
|
+
if (o.open) this.open();
|
|
3860
|
+
}
|
|
3861
|
+
|
|
3862
|
+
setBG(bg) {
|
|
3863
|
+
this.colors;
|
|
3864
|
+
const s = this.s; //if( bg !== undefined ) this.colors.background = bg
|
|
3865
|
+
//this.c[0].style.background = this.colors.background;
|
|
3866
|
+
|
|
3867
|
+
s[1].background = bg; //this.colors.background
|
|
3868
|
+
|
|
3869
|
+
s[2].background = bg; //s[5].border = '1px solid ' + '#000'
|
|
3870
|
+
// s[5].background = '#000'
|
|
3871
|
+
|
|
3872
|
+
this.uis.length;
|
|
3789
3873
|
}
|
|
3790
3874
|
|
|
3791
3875
|
testZone(e) {
|
|
@@ -3865,16 +3949,6 @@
|
|
|
3865
3949
|
} // ----------------------
|
|
3866
3950
|
|
|
3867
3951
|
|
|
3868
|
-
setBG(bg) {
|
|
3869
|
-
if (bg !== undefined) this.colors.background = bg;
|
|
3870
|
-
this.c[0].style.background = this.colors.background;
|
|
3871
|
-
let i = this.uis.length;
|
|
3872
|
-
|
|
3873
|
-
while (i--) {
|
|
3874
|
-
this.uis[i].setBG(this.colors.background);
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
|
|
3878
3952
|
add() {
|
|
3879
3953
|
let a = arguments;
|
|
3880
3954
|
|
|
@@ -3951,18 +4025,33 @@
|
|
|
3951
4025
|
|
|
3952
4026
|
open() {
|
|
3953
4027
|
super.open();
|
|
3954
|
-
this.setSvg(this.c[4], 'd', this.svgs.arrowDown)
|
|
4028
|
+
this.setSvg(this.c[3], 'd', this.svgs.g2); //this.setSvg( this.c[4], 'd', this.svgs.arrowDown )
|
|
4029
|
+
|
|
3955
4030
|
this.rSizeContent();
|
|
3956
4031
|
this.h - this.baseH;
|
|
4032
|
+
const s = this.s;
|
|
4033
|
+
|
|
4034
|
+
if (this.radius) {
|
|
4035
|
+
s[1].borderRadius = '0px';
|
|
4036
|
+
s[2].borderRadius = '0px';
|
|
4037
|
+
s[1].borderTopLeftRadius = this.radius + 'px';
|
|
4038
|
+
s[1].borderTopRightRadius = this.radius + 'px';
|
|
4039
|
+
s[2].borderBottomLeftRadius = this.radius + 'px';
|
|
4040
|
+
s[2].borderBottomRightRadius = this.radius + 'px';
|
|
4041
|
+
}
|
|
4042
|
+
|
|
3957
4043
|
this.parentHeight();
|
|
3958
4044
|
}
|
|
3959
4045
|
|
|
3960
4046
|
close() {
|
|
3961
4047
|
super.close();
|
|
3962
4048
|
this.h - this.baseH;
|
|
3963
|
-
this.setSvg(this.c[4], 'd', this.svgs.arrow)
|
|
4049
|
+
this.setSvg(this.c[3], 'd', this.svgs.g1); //this.setSvg( this.c[4], 'd', this.svgs.arrow )
|
|
4050
|
+
|
|
3964
4051
|
this.h = this.baseH;
|
|
3965
|
-
|
|
4052
|
+
const s = this.s;
|
|
4053
|
+
s[0].height = this.h + 'px';
|
|
4054
|
+
if (this.radius) s[1].borderRadius = this.radius + 'px';
|
|
3966
4055
|
this.parentHeight();
|
|
3967
4056
|
}
|
|
3968
4057
|
|
|
@@ -3993,9 +4082,15 @@
|
|
|
3993
4082
|
rSize() {
|
|
3994
4083
|
super.rSize();
|
|
3995
4084
|
let s = this.s;
|
|
3996
|
-
|
|
4085
|
+
this.w = this.w - this.decal;
|
|
4086
|
+
s[3].left = this.sa + this.sb - 6 + 'px'; //s[1].width = this.isbgGroup ? (this.w-5) + 'px' : this.w + 'px'
|
|
4087
|
+
|
|
3997
4088
|
s[1].width = this.w + 'px';
|
|
3998
|
-
s[2].width = this.w + 'px';
|
|
4089
|
+
s[2].width = this.w + 'px'; //s[1].width = (this.w - this.decal) + 'px'
|
|
4090
|
+
//s[2].width = (this.w - this.decal) + 'px'
|
|
4091
|
+
|
|
4092
|
+
s[1].left = this.decal + 'px';
|
|
4093
|
+
s[2].left = this.decal + 'px';
|
|
3999
4094
|
if (this.isOpen) this.rSizeContent();
|
|
4000
4095
|
}
|
|
4001
4096
|
|
|
@@ -4428,12 +4523,12 @@
|
|
|
4428
4523
|
if (o.select !== undefined) o.selectable = o.select;
|
|
4429
4524
|
if (o.selectable !== undefined) this.isSelectable = o.selectable;
|
|
4430
4525
|
if (this.txt === '') this.p = 0;
|
|
4431
|
-
let fltop = Math.floor(this.h * 0.5) -
|
|
4526
|
+
let fltop = Math.floor(this.h * 0.5) - 3;
|
|
4432
4527
|
let cc = this.colors;
|
|
4433
4528
|
this.c[2] = this.dom('div', this.css.basic + 'top:0; display:none; border-radius:' + this.radius + 'px;');
|
|
4434
4529
|
this.c[3] = this.dom('div', this.css.item + 'position:absolute; text-align:' + align + '; line-height:' + (this.h - 4) + 'px; top:1px; background:' + cc.button + '; height:' + (this.h - 2) + 'px; border:1px solid ' + cc.border + '; border-radius:' + this.radius + 'px;');
|
|
4435
|
-
this.c[4] = this.dom('path', this.css.basic + 'position:absolute; width:
|
|
4436
|
-
d: this.svgs.
|
|
4530
|
+
this.c[4] = this.dom('path', this.css.basic + 'position:absolute; width:6px; height:6px; top:' + fltop + 'px;', {
|
|
4531
|
+
d: this.svgs.g1,
|
|
4437
4532
|
fill: cc.text,
|
|
4438
4533
|
stroke: 'none'
|
|
4439
4534
|
});
|
|
@@ -4512,12 +4607,10 @@
|
|
|
4512
4607
|
this.dragstart = o.dragstart || null;
|
|
4513
4608
|
this.dragend = o.dragend || null; //this.c[0].style.background = '#FF0000'
|
|
4514
4609
|
|
|
4515
|
-
if (this.isWithImage) this.preloadImage();
|
|
4516
|
-
// populate list
|
|
4517
|
-
|
|
4610
|
+
if (this.isWithImage) this.preloadImage();
|
|
4518
4611
|
this.setList(this.list);
|
|
4519
4612
|
this.init();
|
|
4520
|
-
if (this.isOpenOnStart) this.open(true);
|
|
4613
|
+
if (this.isOpenOnStart) this.open(true);
|
|
4521
4614
|
}
|
|
4522
4615
|
/*send ( v ) {
|
|
4523
4616
|
super.send( v );
|
|
@@ -4982,9 +5075,9 @@
|
|
|
4982
5075
|
|
|
4983
5076
|
if (this.up) {
|
|
4984
5077
|
this.zone.y -= this.h - (this.baseH - 10);
|
|
4985
|
-
this.setSvg(this.c[4], 'd', this.svgs.
|
|
5078
|
+
this.setSvg(this.c[4], 'd', this.svgs.g1);
|
|
4986
5079
|
} else {
|
|
4987
|
-
this.setSvg(this.c[4], 'd', this.svgs.
|
|
5080
|
+
this.setSvg(this.c[4], 'd', this.svgs.g2);
|
|
4988
5081
|
}
|
|
4989
5082
|
|
|
4990
5083
|
this.rSizeContent();
|
|
@@ -5000,7 +5093,7 @@
|
|
|
5000
5093
|
this.h = this.baseH;
|
|
5001
5094
|
this.s[0].height = this.h + 'px';
|
|
5002
5095
|
this.s[2].display = 'none';
|
|
5003
|
-
this.setSvg(this.c[4], 'd', this.svgs.
|
|
5096
|
+
this.setSvg(this.c[4], 'd', this.svgs.g1);
|
|
5004
5097
|
this.zone.h = this.h;
|
|
5005
5098
|
this.parentHeight(-t);
|
|
5006
5099
|
} // -----
|
|
@@ -5027,7 +5120,7 @@
|
|
|
5027
5120
|
s[2].left = d + 'px';
|
|
5028
5121
|
s[3].width = w + 'px';
|
|
5029
5122
|
s[3].left = d + 'px';
|
|
5030
|
-
s[4].left = d + w -
|
|
5123
|
+
s[4].left = d + w - 15 + 'px';
|
|
5031
5124
|
this.ww = w;
|
|
5032
5125
|
if (this.max > this.maxHeight) this.ww = w - this.ss;
|
|
5033
5126
|
if (this.isOpen) this.rSizeContent();
|
|
@@ -5339,12 +5432,16 @@
|
|
|
5339
5432
|
|
|
5340
5433
|
rSize() {
|
|
5341
5434
|
super.rSize();
|
|
5342
|
-
let
|
|
5435
|
+
let sx = this.colors.sx;
|
|
5436
|
+
let ss = sx * (this.lng - 1);
|
|
5437
|
+
let w = (this.sb - ss) / this.lng; //(( this.sb + sx ) / this.lng )-sx
|
|
5438
|
+
|
|
5343
5439
|
let s = this.s;
|
|
5344
5440
|
let i = this.lng;
|
|
5345
5441
|
|
|
5346
5442
|
while (i--) {
|
|
5347
|
-
this.tmp[i] = [Math.floor(this.sa + w * i + 5 * i), w];
|
|
5443
|
+
//this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
|
|
5444
|
+
this.tmp[i] = [this.sa + w * i + sx * i, w];
|
|
5348
5445
|
this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
|
|
5349
5446
|
s[3 + i].left = this.tmp[i][0] + 'px';
|
|
5350
5447
|
s[3 + i].width = this.tmp[i][1] + 'px';
|
|
@@ -5381,27 +5478,29 @@
|
|
|
5381
5478
|
this.c[2].style.lineHeight = this.h - 10 + 'px';
|
|
5382
5479
|
|
|
5383
5480
|
if (this.model !== 0) {
|
|
5384
|
-
let
|
|
5481
|
+
let r1 = 4,
|
|
5482
|
+
h1 = 4,
|
|
5385
5483
|
h2 = 8,
|
|
5386
|
-
ww = this.h -
|
|
5387
|
-
ra =
|
|
5484
|
+
ww = this.h - 6,
|
|
5485
|
+
ra = 16;
|
|
5388
5486
|
|
|
5389
5487
|
if (this.model === 2) {
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
h2 =
|
|
5488
|
+
r1 = 0;
|
|
5489
|
+
h1 = 2;
|
|
5490
|
+
h2 = 4;
|
|
5393
5491
|
ra = 2;
|
|
5394
|
-
ww = (this.h -
|
|
5492
|
+
ww = (this.h - 6) * 0.5;
|
|
5395
5493
|
}
|
|
5396
5494
|
|
|
5397
5495
|
if (this.model === 3) this.c[5].style.visible = 'none';
|
|
5398
|
-
this.c[4].style.borderRadius =
|
|
5496
|
+
this.c[4].style.borderRadius = r1 + 'px';
|
|
5399
5497
|
this.c[4].style.height = h2 + 'px';
|
|
5400
5498
|
this.c[4].style.top = this.h * 0.5 - h1 + 'px';
|
|
5401
|
-
this.c[5].style.borderRadius =
|
|
5499
|
+
this.c[5].style.borderRadius = r1 * 0.5 + 'px';
|
|
5402
5500
|
this.c[5].style.height = h1 + 'px';
|
|
5403
|
-
this.c[5].style.top = this.h * 0.5 - h1 * 0.5 + 'px';
|
|
5404
|
-
|
|
5501
|
+
this.c[5].style.top = this.h * 0.5 - h1 * 0.5 + 'px'; //this.c[6] = this.dom( 'div', this.css.basic + 'border-radius:'+ra+'px; margin-left:'+(-ww*0.5)+'px; border:1px solid '+cc.border+'; background:'+cc.button+'; left:4px; top:2px; height:'+(this.h-4)+'px; width:'+ww+'px;' );
|
|
5502
|
+
|
|
5503
|
+
this.c[6] = this.dom('div', this.css.basic + 'border-radius:' + ra + 'px; margin-left:' + -ww * 0.5 + 'px; background:' + cc.text + '; left:4px; top:3px; height:' + (this.h - 6) + 'px; width:' + ww + 'px;');
|
|
5405
5504
|
}
|
|
5406
5505
|
|
|
5407
5506
|
this.init();
|
|
@@ -5514,6 +5613,8 @@
|
|
|
5514
5613
|
s[2].color = cc.text;
|
|
5515
5614
|
s[4].background = cc.back;
|
|
5516
5615
|
s[5].background = cc.text;
|
|
5616
|
+
if (this.model !== 0) s[6].background = cc.text; //cc.button;
|
|
5617
|
+
|
|
5517
5618
|
break;
|
|
5518
5619
|
|
|
5519
5620
|
case 1:
|
|
@@ -5522,17 +5623,9 @@
|
|
|
5522
5623
|
s[2].color = cc.textOver;
|
|
5523
5624
|
s[4].background = cc.back;
|
|
5524
5625
|
s[5].background = cc.textOver;
|
|
5525
|
-
|
|
5626
|
+
if (this.model !== 0) s[6].background = cc.textOver; //cc.overoff;
|
|
5526
5627
|
|
|
5527
|
-
|
|
5528
|
-
s[2].border = '1px solid ' + this.colors.borderSelect;
|
|
5529
|
-
break;
|
|
5530
|
-
case 3:
|
|
5531
|
-
s[2].border = '1px dashed ' + this.colors.text;//this.colors.borderSelect;
|
|
5532
|
-
break;
|
|
5533
|
-
case 4:
|
|
5534
|
-
s[2].border = '1px dashed ' + this.colors.hide;
|
|
5535
|
-
break;*/
|
|
5628
|
+
break;
|
|
5536
5629
|
}
|
|
5537
5630
|
}
|
|
5538
5631
|
|
|
@@ -7330,7 +7423,7 @@
|
|
|
7330
7423
|
|
|
7331
7424
|
}
|
|
7332
7425
|
|
|
7333
|
-
const REVISION = '4.2.
|
|
7426
|
+
const REVISION = '4.2.2';
|
|
7334
7427
|
|
|
7335
7428
|
exports.Files = Files;
|
|
7336
7429
|
exports.Gui = Gui;
|