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.module.js
CHANGED
|
@@ -970,7 +970,7 @@ const T = {
|
|
|
970
970
|
if( o.groupBorder ) color.gborder = o.groupBorder;
|
|
971
971
|
|
|
972
972
|
if( o.transparent ) o.bg = 'none';
|
|
973
|
-
if( o.bg ) color.background = color.backgroundOver = o.bg
|
|
973
|
+
//if( o.bg ) color.background = color.backgroundOver = o.bg
|
|
974
974
|
if( o.bgOver ) color.backgroundOver = o.bgOver;
|
|
975
975
|
|
|
976
976
|
for( let m in color ){
|
|
@@ -989,6 +989,9 @@ const T = {
|
|
|
989
989
|
|
|
990
990
|
colors: {
|
|
991
991
|
|
|
992
|
+
sx: 3,
|
|
993
|
+
sy: 3,
|
|
994
|
+
|
|
992
995
|
content:'none',
|
|
993
996
|
background: 'rgba(50,50,50,0.3)',
|
|
994
997
|
backgroundOver: 'rgba(50,50,50,0.4)',
|
|
@@ -1011,6 +1014,7 @@ const T = {
|
|
|
1011
1014
|
borderSize : 1,
|
|
1012
1015
|
gborder : 'none',
|
|
1013
1016
|
|
|
1017
|
+
groups : 'none',
|
|
1014
1018
|
button : '#3c3c3c',
|
|
1015
1019
|
overoff : '#5c5c5c',
|
|
1016
1020
|
over : '#024699',
|
|
@@ -1019,13 +1023,13 @@ const T = {
|
|
|
1019
1023
|
|
|
1020
1024
|
|
|
1021
1025
|
//fontFamily: 'Tahoma',
|
|
1022
|
-
fontFamily: 'Consolas,
|
|
1026
|
+
fontFamily: 'Consolas, monospace',
|
|
1023
1027
|
//fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
|
|
1024
1028
|
fontWeight: 'normal',
|
|
1025
1029
|
fontShadow: 'none',//'#000',
|
|
1026
1030
|
fontSize:12,
|
|
1027
1031
|
|
|
1028
|
-
radius:
|
|
1032
|
+
radius:3,
|
|
1029
1033
|
hide: 'rgba(0,0,0,0)',
|
|
1030
1034
|
|
|
1031
1035
|
},
|
|
@@ -1037,6 +1041,7 @@ const T = {
|
|
|
1037
1041
|
//unselect: '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
|
|
1038
1042
|
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;',
|
|
1039
1043
|
button:'display:flex; justify-content:center; align-items:center; text-align:center;',
|
|
1044
|
+
middle:'display:flex; align-items:center;',
|
|
1040
1045
|
|
|
1041
1046
|
/*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;',
|
|
1042
1047
|
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+';',
|
|
@@ -1047,6 +1052,9 @@ const T = {
|
|
|
1047
1052
|
|
|
1048
1053
|
svgs: {
|
|
1049
1054
|
|
|
1055
|
+
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',
|
|
1056
|
+
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',
|
|
1057
|
+
|
|
1050
1058
|
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',
|
|
1051
1059
|
arrow:'M 3 8 L 8 5 3 2 3 8 Z',
|
|
1052
1060
|
arrowDown:'M 5 8 L 8 3 2 3 5 8 Z',
|
|
@@ -1117,7 +1125,7 @@ const T = {
|
|
|
1117
1125
|
|
|
1118
1126
|
let align = 'display:flex; justify-content:left; align-items:center; text-align:left;';
|
|
1119
1127
|
|
|
1120
|
-
T.css.txt = T.css.basic + align + ' font-family:'+ font +'; font-weight:'+weight+'; font-size:'+size+'; color:'+cc.text+'; padding:0px
|
|
1128
|
+
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;';
|
|
1121
1129
|
if( shadow !== 'none' ) T.css.txt += ' text-shadow: 1px 1px 1px '+shadow+';';
|
|
1122
1130
|
|
|
1123
1131
|
T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';';
|
|
@@ -1748,11 +1756,26 @@ class Files {
|
|
|
1748
1756
|
case 'svg':
|
|
1749
1757
|
t = [ { accept: { 'image/svg+xml': '.svg'} }, ];
|
|
1750
1758
|
break;
|
|
1759
|
+
case 'wav':
|
|
1760
|
+
t = [ { accept: { 'audio/wav': '.wav'} }, ];
|
|
1761
|
+
break;
|
|
1762
|
+
case 'mp3':
|
|
1763
|
+
t = [ { accept: { 'audio/mpeg': '.mp3'} }, ];
|
|
1764
|
+
break;
|
|
1765
|
+
case 'mp4':
|
|
1766
|
+
t = [ { accept: { 'video/mp4': '.mp4'} }, ];
|
|
1767
|
+
break;
|
|
1768
|
+
case 'bin':case 'hex':
|
|
1769
|
+
t = [ { description: 'Binary Files', accept: { 'application/octet-stream': ['.bin', '.hex'] } }, ];
|
|
1770
|
+
break;
|
|
1751
1771
|
case 'text':
|
|
1752
1772
|
t = [ { description: 'Text Files', accept: { 'text/plain': ['.txt', '.text'], 'text/html': ['.html', '.htm'] } }, ];
|
|
1753
1773
|
break;
|
|
1754
1774
|
case 'json':
|
|
1755
|
-
t = [ { description: 'JSON Files', accept: { '
|
|
1775
|
+
t = [ { description: 'JSON Files', accept: { 'application/json': ['.json'] } }, ];//text/plain
|
|
1776
|
+
break;
|
|
1777
|
+
case 'js':
|
|
1778
|
+
t = [ { description: 'JavaScript Files', accept: { 'text/javascript': ['.js'] } }, ];
|
|
1756
1779
|
break;
|
|
1757
1780
|
case 'image':
|
|
1758
1781
|
t = [ { description: 'Images', accept: { 'image/*': ['.png', '.gif', '.jpeg', '.jpg'] } }, ];
|
|
@@ -2161,7 +2184,7 @@ class Proto {
|
|
|
2161
2184
|
this.fw = o.fw || 0;
|
|
2162
2185
|
|
|
2163
2186
|
this.autoWidth = o.auto || true;// auto width or flex
|
|
2164
|
-
this.isOpen = false;// open statu
|
|
2187
|
+
this.isOpen = false;//false// open statu
|
|
2165
2188
|
|
|
2166
2189
|
// radius for toolbox
|
|
2167
2190
|
this.radius = o.radius || this.colors.radius;
|
|
@@ -2239,6 +2262,7 @@ class Proto {
|
|
|
2239
2262
|
this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent';
|
|
2240
2263
|
this.s[0].borderBottom = (this.margin*0.5) + 'px solid transparent';
|
|
2241
2264
|
} else {
|
|
2265
|
+
//this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent'
|
|
2242
2266
|
this.s[0].borderBottom = this.margin + 'px solid transparent';
|
|
2243
2267
|
}
|
|
2244
2268
|
|
|
@@ -2246,7 +2270,7 @@ class Proto {
|
|
|
2246
2270
|
|
|
2247
2271
|
// with title
|
|
2248
2272
|
if( !this.simple ){
|
|
2249
|
-
this.c[1] = Tools.dom( 'div', this.css.txt );
|
|
2273
|
+
this.c[1] = Tools.dom( 'div', this.css.txt + this.css.middle );
|
|
2250
2274
|
this.s[1] = this.c[1].style;
|
|
2251
2275
|
this.c[1].textContent = this.name;
|
|
2252
2276
|
this.s[1].color = this.lock ? this.colors.titleoff : this.colors.title;
|
|
@@ -2295,8 +2319,10 @@ class Proto {
|
|
|
2295
2319
|
//if( this.autoHeight ) s[0].transition = 'height 0.01s ease-out';
|
|
2296
2320
|
if( c[1] !== undefined && this.autoWidth ){
|
|
2297
2321
|
s[1] = c[1].style;
|
|
2298
|
-
s[1].
|
|
2299
|
-
s[1].
|
|
2322
|
+
s[1].top = 1 + 'px';
|
|
2323
|
+
s[1].height = (this.h-2) + 'px';
|
|
2324
|
+
//s[1].height = (this.h-4) + 'px';
|
|
2325
|
+
// s[1].lineHeight = (this.h-8) + 'px';
|
|
2300
2326
|
}
|
|
2301
2327
|
|
|
2302
2328
|
let frag = Tools.frag;
|
|
@@ -2597,8 +2623,10 @@ class Proto {
|
|
|
2597
2623
|
this.sb = this.w - this.sa;
|
|
2598
2624
|
} else {
|
|
2599
2625
|
let pp = this.w * ( this.p / 100 );
|
|
2600
|
-
this.sa = Math.floor( pp + 10 )
|
|
2601
|
-
this.sb = Math.floor( this.w - pp - 20 )
|
|
2626
|
+
//this.sa = Math.floor( pp + 10 )
|
|
2627
|
+
//this.sb = Math.floor( this.w - pp - 20 )
|
|
2628
|
+
this.sa = Math.floor( pp + 8 );
|
|
2629
|
+
this.sb = Math.floor( this.w - pp - 16 );
|
|
2602
2630
|
}
|
|
2603
2631
|
|
|
2604
2632
|
}
|
|
@@ -2920,6 +2948,8 @@ class Button extends Proto {
|
|
|
2920
2948
|
this.values = o.value || this.txt;
|
|
2921
2949
|
if( o.values ) this.values = o.values;
|
|
2922
2950
|
|
|
2951
|
+
if( !o.values && !o.value ) this.txt = '';
|
|
2952
|
+
|
|
2923
2953
|
|
|
2924
2954
|
|
|
2925
2955
|
this.onName = o.onName || null;
|
|
@@ -2962,7 +2992,7 @@ class Button extends Proto {
|
|
|
2962
2992
|
//this.txt = ''
|
|
2963
2993
|
}
|
|
2964
2994
|
}
|
|
2965
|
-
if(
|
|
2995
|
+
if( this.txt==='' ) this.p = 0;
|
|
2966
2996
|
|
|
2967
2997
|
this.init();
|
|
2968
2998
|
|
|
@@ -3127,17 +3157,20 @@ class Button extends Proto {
|
|
|
3127
3157
|
let d = this.sa;
|
|
3128
3158
|
|
|
3129
3159
|
let i = this.lng;
|
|
3130
|
-
let
|
|
3131
|
-
let size = Math.floor( ( w-(dc*(i-1)) ) / i );
|
|
3160
|
+
let sx = this.colors.sx; //this.space;
|
|
3161
|
+
//let size = Math.floor( ( w-(dc*(i-1)) ) / i );
|
|
3162
|
+
let size = ( ( w-(sx*(i-1)) ) / i );
|
|
3132
3163
|
|
|
3133
3164
|
if( this.bw ){
|
|
3134
3165
|
size = this.bw < size ? this.bw : size;
|
|
3135
|
-
d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5)
|
|
3166
|
+
//d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5)
|
|
3167
|
+
d = ((this.w-( (size * i) + (sx * (i-1)) ))*0.5);
|
|
3136
3168
|
}
|
|
3137
3169
|
|
|
3138
3170
|
while( i-- ){
|
|
3139
3171
|
|
|
3140
|
-
this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
|
|
3172
|
+
//this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
|
|
3173
|
+
this.tmp[i] = [ ( d + ( size * i ) + ( sx * i )), size ];
|
|
3141
3174
|
this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
|
|
3142
3175
|
|
|
3143
3176
|
s[i+2].left = this.tmp[i][0] + 'px';
|
|
@@ -3850,13 +3883,15 @@ class Fps extends Proto {
|
|
|
3850
3883
|
}
|
|
3851
3884
|
|
|
3852
3885
|
|
|
3853
|
-
let fltop = Math.floor(this.h*0.5)-
|
|
3886
|
+
let fltop = Math.floor(this.h*0.5)-3;
|
|
3887
|
+
const ccc = this.colors;
|
|
3854
3888
|
|
|
3855
3889
|
this.c[1].textContent = this.txt;
|
|
3890
|
+
//this.c[1].innerHTML = ' ' + this.txt
|
|
3856
3891
|
this.c[0].style.cursor = 'pointer';
|
|
3857
3892
|
this.c[0].style.pointerEvents = 'auto';
|
|
3858
3893
|
|
|
3859
|
-
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 '+
|
|
3894
|
+
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 +';';
|
|
3860
3895
|
|
|
3861
3896
|
if( this.radius !== 0 ) panelCss += 'border-radius:' + this.radius+'px;';
|
|
3862
3897
|
|
|
@@ -3872,7 +3907,8 @@ class Fps extends Proto {
|
|
|
3872
3907
|
//this.dom( 'path', null, { fill:'rgba(0,255,255,0.3)', 'stroke-width':1, stroke:'#0FF', 'vector-effect':'non-scaling-stroke' }, this.c[2] );
|
|
3873
3908
|
|
|
3874
3909
|
// arrow
|
|
3875
|
-
this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:
|
|
3910
|
+
this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:6px; height:6px; left:0; top:'+fltop+'px;', { d:this.svgs.g1, fill:ccc.text, stroke:'none'});
|
|
3911
|
+
//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'});
|
|
3876
3912
|
|
|
3877
3913
|
// result test
|
|
3878
3914
|
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;' );
|
|
@@ -3882,15 +3918,18 @@ class Fps extends Proto {
|
|
|
3882
3918
|
|
|
3883
3919
|
this.isShow = false;
|
|
3884
3920
|
|
|
3921
|
+
|
|
3922
|
+
|
|
3885
3923
|
let s = this.s;
|
|
3886
3924
|
|
|
3887
|
-
s[1].marginLeft = '10px';
|
|
3925
|
+
//s[1].marginLeft = '10px';
|
|
3888
3926
|
s[1].lineHeight = this.h-4;
|
|
3889
|
-
s[1].color =
|
|
3927
|
+
s[1].color = ccc.text;
|
|
3928
|
+
//s[1].paddingLeft = '18px';
|
|
3890
3929
|
//s[1].fontWeight = 'bold';
|
|
3891
3930
|
|
|
3892
3931
|
if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
|
|
3893
|
-
if( this.colors.gborder!=='none') s[0].border = '1px solid ' +
|
|
3932
|
+
if( this.colors.gborder!=='none') s[0].border = '1px solid ' + ccc.gborder;
|
|
3894
3933
|
|
|
3895
3934
|
|
|
3896
3935
|
|
|
@@ -4009,7 +4048,7 @@ class Fps extends Proto {
|
|
|
4009
4048
|
|
|
4010
4049
|
this.h = this.hplus + this.baseH;
|
|
4011
4050
|
|
|
4012
|
-
this.setSvg( this.c[3], 'd', this.svgs.
|
|
4051
|
+
this.setSvg( this.c[3], 'd', this.svgs.g2 );
|
|
4013
4052
|
|
|
4014
4053
|
if( this.group !== null ){ this.group.calc( this.hplus );}
|
|
4015
4054
|
else if( this.isUI ) this.main.calc( this.hplus );
|
|
@@ -4029,7 +4068,7 @@ class Fps extends Proto {
|
|
|
4029
4068
|
|
|
4030
4069
|
this.h = this.baseH;
|
|
4031
4070
|
|
|
4032
|
-
this.setSvg( this.c[3], 'd', this.svgs.
|
|
4071
|
+
this.setSvg( this.c[3], 'd', this.svgs.g1 );
|
|
4033
4072
|
|
|
4034
4073
|
if( this.group !== null ){ this.group.calc( -this.hplus );}
|
|
4035
4074
|
else if( this.isUI ) this.main.calc( -this.hplus );
|
|
@@ -4100,6 +4139,8 @@ class Fps extends Proto {
|
|
|
4100
4139
|
let s = this.s;
|
|
4101
4140
|
let w = this.w;
|
|
4102
4141
|
|
|
4142
|
+
s[3].left = ( this.sa + this.sb - 6 ) + 'px';
|
|
4143
|
+
|
|
4103
4144
|
s[0].width = w + 'px';
|
|
4104
4145
|
s[1].width = w + 'px';
|
|
4105
4146
|
s[2].left = 10 + 'px';
|
|
@@ -4434,46 +4475,96 @@ class Group extends Proto {
|
|
|
4434
4475
|
this.current = -1;
|
|
4435
4476
|
this.proto = null;
|
|
4436
4477
|
this.isEmpty = true;
|
|
4437
|
-
|
|
4478
|
+
|
|
4479
|
+
this.decal = o.group ? 8 : 0;
|
|
4438
4480
|
|
|
4439
4481
|
this.baseH = this.h;
|
|
4440
4482
|
|
|
4441
|
-
let fltop = Math.floor(this.h*0.5)-
|
|
4483
|
+
let fltop = Math.floor(this.h*0.5)-3;
|
|
4442
4484
|
|
|
4443
|
-
|
|
4485
|
+
const cc = this.colors;
|
|
4444
4486
|
|
|
4445
|
-
this.
|
|
4487
|
+
this.isLine = o.line !== undefined ? o.line : false;
|
|
4446
4488
|
|
|
4447
|
-
|
|
4448
|
-
this.decal = o.group.decal ? o.group.decal : 0;
|
|
4449
|
-
this.decal += 6;
|
|
4450
|
-
}
|
|
4489
|
+
|
|
4451
4490
|
|
|
4452
4491
|
this.useFlex = true;
|
|
4453
4492
|
let flexible = this.useFlex ? 'display:flex; flex-flow: row wrap;' : '';
|
|
4454
4493
|
|
|
4455
|
-
this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+this.h+'px')
|
|
4456
|
-
this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:
|
|
4457
|
-
this.c[
|
|
4494
|
+
this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+(this.h-1)+'px');
|
|
4495
|
+
this.c[3] = this.dom( 'path', this.css.basic + 'position:absolute; width:6px; height:6px; left:0; top:'+fltop+'px;', { d:this.svgs.g1, fill:cc.text, stroke:'none'});
|
|
4496
|
+
//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'})
|
|
4497
|
+
//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'})
|
|
4498
|
+
//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'})
|
|
4499
|
+
|
|
4500
|
+
|
|
4501
|
+
|
|
4458
4502
|
// bottom line
|
|
4459
4503
|
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');
|
|
4504
|
+
//else this.c[5] = this.dom( 'div', this.css.basic + 'width:100%; left:0; height:auto; top:'+(this.h-1)+'px')
|
|
4460
4505
|
|
|
4461
4506
|
let s = this.s;
|
|
4462
4507
|
s[0].height = this.h + 'px';
|
|
4463
|
-
s[1].height = this.h + 'px';
|
|
4464
4508
|
this.c[1].name = 'group';
|
|
4465
4509
|
|
|
4466
|
-
|
|
4510
|
+
if( cc.groups !== 'none' ){
|
|
4511
|
+
|
|
4512
|
+
s[1].background = cc.groups;
|
|
4513
|
+
s[1].border = cc.borderSize+'px solid '+ cc.border;
|
|
4514
|
+
s[1].borderRadius = this.radius+'px';
|
|
4515
|
+
|
|
4516
|
+
//s[5].border = '2px solid ' + '#000'
|
|
4517
|
+
//s[1].marginRight = 10+'px';
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
//this.c[1].innerHTML = this.dd + this.name
|
|
4521
|
+
|
|
4522
|
+
//s[1].padding = '0px ' + (10+this.decal)+'px';
|
|
4523
|
+
|
|
4467
4524
|
s[1].lineHeight = this.h-4;
|
|
4468
|
-
s[1].color =
|
|
4525
|
+
s[1].color = cc.text;
|
|
4469
4526
|
//s[1].fontWeight = 'bold';
|
|
4470
4527
|
|
|
4471
|
-
|
|
4528
|
+
|
|
4529
|
+
|
|
4530
|
+
|
|
4531
|
+
|
|
4472
4532
|
this.init();
|
|
4473
4533
|
|
|
4534
|
+
if( this.radius !== 0 ){
|
|
4535
|
+
//s[0].borderRadius = this.radius+'px'
|
|
4536
|
+
|
|
4537
|
+
s[1].borderRadius = this.radius+'px';
|
|
4538
|
+
s[2].borderRadius = this.radius+'px';
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
|
|
4542
|
+
//s[1].paddingLeft = (10+this.decal)+'px'
|
|
4543
|
+
|
|
4474
4544
|
this.setBG( o.bg );
|
|
4475
4545
|
|
|
4476
|
-
if( o.open
|
|
4546
|
+
if( o.open ) this.open();
|
|
4547
|
+
|
|
4548
|
+
}
|
|
4549
|
+
|
|
4550
|
+
setBG ( bg ) {
|
|
4551
|
+
|
|
4552
|
+
this.colors;
|
|
4553
|
+
|
|
4554
|
+
const s = this.s;
|
|
4555
|
+
|
|
4556
|
+
//if( bg !== undefined ) this.colors.background = bg
|
|
4557
|
+
|
|
4558
|
+
//this.c[0].style.background = this.colors.background;
|
|
4559
|
+
s[1].background = bg;//this.colors.background
|
|
4560
|
+
s[2].background = bg;
|
|
4561
|
+
|
|
4562
|
+
//s[5].border = '1px solid ' + '#000'
|
|
4563
|
+
// s[5].background = '#000'
|
|
4564
|
+
|
|
4565
|
+
|
|
4566
|
+
|
|
4567
|
+
this.uis.length;
|
|
4477
4568
|
|
|
4478
4569
|
}
|
|
4479
4570
|
|
|
@@ -4577,18 +4668,7 @@ class Group extends Proto {
|
|
|
4577
4668
|
|
|
4578
4669
|
// ----------------------
|
|
4579
4670
|
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
if( bg !== undefined ) this.colors.background = bg;
|
|
4583
|
-
|
|
4584
|
-
this.c[0].style.background = this.colors.background;
|
|
4585
|
-
|
|
4586
|
-
let i = this.uis.length;
|
|
4587
|
-
while(i--){
|
|
4588
|
-
this.uis[i].setBG( this.colors.background );
|
|
4589
|
-
}
|
|
4590
|
-
|
|
4591
|
-
}
|
|
4671
|
+
|
|
4592
4672
|
|
|
4593
4673
|
add() {
|
|
4594
4674
|
|
|
@@ -4687,11 +4767,29 @@ class Group extends Proto {
|
|
|
4687
4767
|
|
|
4688
4768
|
super.open();
|
|
4689
4769
|
|
|
4690
|
-
this.setSvg( this.c[
|
|
4770
|
+
this.setSvg( this.c[3], 'd', this.svgs.g2 );
|
|
4771
|
+
|
|
4772
|
+
//this.setSvg( this.c[4], 'd', this.svgs.arrowDown )
|
|
4691
4773
|
this.rSizeContent();
|
|
4692
4774
|
|
|
4693
4775
|
this.h - this.baseH;
|
|
4694
4776
|
|
|
4777
|
+
const s = this.s;
|
|
4778
|
+
|
|
4779
|
+
if(this.radius){
|
|
4780
|
+
|
|
4781
|
+
s[1].borderRadius = '0px';
|
|
4782
|
+
s[2].borderRadius = '0px';
|
|
4783
|
+
|
|
4784
|
+
s[1].borderTopLeftRadius = this.radius+'px';
|
|
4785
|
+
s[1].borderTopRightRadius = this.radius+'px';
|
|
4786
|
+
s[2].borderBottomLeftRadius = this.radius+'px';
|
|
4787
|
+
s[2].borderBottomRightRadius = this.radius+'px';
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
|
|
4791
|
+
|
|
4792
|
+
|
|
4695
4793
|
this.parentHeight();
|
|
4696
4794
|
|
|
4697
4795
|
}
|
|
@@ -4702,9 +4800,14 @@ class Group extends Proto {
|
|
|
4702
4800
|
|
|
4703
4801
|
this.h - this.baseH;
|
|
4704
4802
|
|
|
4705
|
-
this.setSvg( this.c[
|
|
4803
|
+
this.setSvg( this.c[3], 'd', this.svgs.g1 );
|
|
4804
|
+
|
|
4805
|
+
//this.setSvg( this.c[4], 'd', this.svgs.arrow )
|
|
4706
4806
|
this.h = this.baseH;
|
|
4707
|
-
|
|
4807
|
+
|
|
4808
|
+
const s = this.s;
|
|
4809
|
+
s[0].height = this.h + 'px';
|
|
4810
|
+
if(this.radius) s[1].borderRadius = this.radius+'px';
|
|
4708
4811
|
|
|
4709
4812
|
this.parentHeight();
|
|
4710
4813
|
|
|
@@ -4751,9 +4854,20 @@ class Group extends Proto {
|
|
|
4751
4854
|
|
|
4752
4855
|
let s = this.s;
|
|
4753
4856
|
|
|
4754
|
-
|
|
4857
|
+
this.w = this.w - this.decal;
|
|
4858
|
+
|
|
4859
|
+
s[3].left = ( this.sa + this.sb - 6 ) + 'px';
|
|
4860
|
+
//s[1].width = this.isbgGroup ? (this.w-5) + 'px' : this.w + 'px'
|
|
4861
|
+
|
|
4755
4862
|
s[1].width = this.w + 'px';
|
|
4756
4863
|
s[2].width = this.w + 'px';
|
|
4864
|
+
//s[1].width = (this.w - this.decal) + 'px'
|
|
4865
|
+
//s[2].width = (this.w - this.decal) + 'px'
|
|
4866
|
+
|
|
4867
|
+
s[1].left = (this.decal) + 'px';
|
|
4868
|
+
s[2].left = (this.decal) + 'px';
|
|
4869
|
+
|
|
4870
|
+
|
|
4757
4871
|
|
|
4758
4872
|
if( this.isOpen ) this.rSizeContent();
|
|
4759
4873
|
|
|
@@ -5297,14 +5411,12 @@ class List extends Proto {
|
|
|
5297
5411
|
if( this.txt === '' ) this.p = 0;
|
|
5298
5412
|
|
|
5299
5413
|
|
|
5300
|
-
let fltop = Math.floor(this.h*0.5)-
|
|
5414
|
+
let fltop = Math.floor(this.h*0.5)-3;
|
|
5301
5415
|
let cc = this.colors;
|
|
5302
5416
|
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
5417
|
this.c[2] = this.dom( 'div', this.css.basic + 'top:0; display:none; border-radius:'+this.radius+'px;' );
|
|
5306
5418
|
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;' );
|
|
5307
|
-
this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:
|
|
5419
|
+
this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:6px; height:6px; top:'+fltop+'px;', { d:this.svgs.g1, fill:cc.text, stroke:'none'});
|
|
5308
5420
|
|
|
5309
5421
|
this.scrollerBack = this.dom( 'div', this.css.basic + 'right:0px; width:'+ss+'px; background:'+cc.back+'; display:none;');
|
|
5310
5422
|
this.scroller = this.dom( 'div', this.css.basic + 'right:'+((ss-(ss*0.25))*0.5)+'px; width:'+(ss*0.25)+'px; background:'+cc.text+'; display:none; ');
|
|
@@ -5364,8 +5476,6 @@ class List extends Proto {
|
|
|
5364
5476
|
this.listIn = this.dom( 'div', this.css.basic + 'left:0; top:0; width:100%; background:none;');
|
|
5365
5477
|
this.listIn.name = 'list';
|
|
5366
5478
|
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
5479
|
this.topList = 0;
|
|
5370
5480
|
|
|
5371
5481
|
this.c[2].appendChild( this.listIn );
|
|
@@ -5404,12 +5514,10 @@ class List extends Proto {
|
|
|
5404
5514
|
|
|
5405
5515
|
//this.c[0].style.background = '#FF0000'
|
|
5406
5516
|
if( this.isWithImage ) this.preloadImage();
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
if( this.isOpenOnStart ) this.open( true );
|
|
5412
|
-
// }
|
|
5517
|
+
|
|
5518
|
+
this.setList( this.list );
|
|
5519
|
+
this.init();
|
|
5520
|
+
if( this.isOpenOnStart ) this.open( true );
|
|
5413
5521
|
|
|
5414
5522
|
}
|
|
5415
5523
|
|
|
@@ -5969,9 +6077,9 @@ class List extends Proto {
|
|
|
5969
6077
|
|
|
5970
6078
|
if( this.up ){
|
|
5971
6079
|
this.zone.y -= this.h - (this.baseH-10);
|
|
5972
|
-
this.setSvg( this.c[4], 'd', this.svgs.
|
|
6080
|
+
this.setSvg( this.c[4], 'd', this.svgs.g1 );
|
|
5973
6081
|
} else {
|
|
5974
|
-
this.setSvg( this.c[4], 'd', this.svgs.
|
|
6082
|
+
this.setSvg( this.c[4], 'd', this.svgs.g2 );
|
|
5975
6083
|
}
|
|
5976
6084
|
|
|
5977
6085
|
this.rSizeContent();
|
|
@@ -5995,7 +6103,7 @@ class List extends Proto {
|
|
|
5995
6103
|
this.h = this.baseH;
|
|
5996
6104
|
this.s[0].height = this.h + 'px';
|
|
5997
6105
|
this.s[2].display = 'none';
|
|
5998
|
-
this.setSvg( this.c[4], 'd', this.svgs.
|
|
6106
|
+
this.setSvg( this.c[4], 'd', this.svgs.g1 );
|
|
5999
6107
|
|
|
6000
6108
|
this.zone.h = this.h;
|
|
6001
6109
|
|
|
@@ -6036,7 +6144,7 @@ class List extends Proto {
|
|
|
6036
6144
|
s[3].width = w + 'px';
|
|
6037
6145
|
s[3].left = d + 'px';
|
|
6038
6146
|
|
|
6039
|
-
s[4].left = d + w -
|
|
6147
|
+
s[4].left = d + w - 15 + 'px';
|
|
6040
6148
|
|
|
6041
6149
|
this.ww = w;
|
|
6042
6150
|
if( this.max > this.maxHeight ) this.ww = w-this.ss;
|
|
@@ -6441,12 +6549,15 @@ class Numeric extends Proto {
|
|
|
6441
6549
|
rSize () {
|
|
6442
6550
|
|
|
6443
6551
|
super.rSize();
|
|
6444
|
-
|
|
6445
|
-
let
|
|
6552
|
+
let sx = this.colors.sx;
|
|
6553
|
+
let ss = sx * (this.lng-1);
|
|
6554
|
+
let w = (this.sb-ss) / this.lng;//(( this.sb + sx ) / this.lng )-sx
|
|
6446
6555
|
let s = this.s;
|
|
6447
6556
|
let i = this.lng;
|
|
6557
|
+
|
|
6448
6558
|
while(i--){
|
|
6449
|
-
this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
|
|
6559
|
+
//this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
|
|
6560
|
+
this.tmp[i] = [ ( this.sa + ( w * i )+( sx * i )), w ];
|
|
6450
6561
|
this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
|
|
6451
6562
|
s[ 3 + i ].left = this.tmp[i][0] + 'px';
|
|
6452
6563
|
s[ 3 + i ].width = this.tmp[i][1] + 'px';
|
|
@@ -6497,25 +6608,27 @@ class Slide extends Proto {
|
|
|
6497
6608
|
|
|
6498
6609
|
if(this.model !== 0){
|
|
6499
6610
|
|
|
6500
|
-
let h1 = 4, h2 = 8, ww = this.h-
|
|
6611
|
+
let r1 = 4, h1 = 4, h2 = 8, ww = this.h-6, ra = 16;
|
|
6501
6612
|
|
|
6502
6613
|
if( this.model === 2 ){
|
|
6503
|
-
|
|
6504
|
-
|
|
6614
|
+
r1 = 0;
|
|
6615
|
+
h1 = 2;
|
|
6616
|
+
h2 = 4;
|
|
6505
6617
|
ra = 2;
|
|
6506
|
-
ww = (this.h-
|
|
6618
|
+
ww = (this.h-6)*0.5;
|
|
6507
6619
|
}
|
|
6508
6620
|
|
|
6509
|
-
if(this.model === 3) this.c[5].style.visible = 'none';
|
|
6621
|
+
if( this.model === 3 ) this.c[5].style.visible = 'none';
|
|
6510
6622
|
|
|
6511
|
-
this.c[4].style.borderRadius =
|
|
6623
|
+
this.c[4].style.borderRadius = r1 + 'px';
|
|
6512
6624
|
this.c[4].style.height = h2 + 'px';
|
|
6513
6625
|
this.c[4].style.top = (this.h*0.5) - h1 + 'px';
|
|
6514
|
-
this.c[5].style.borderRadius = (
|
|
6626
|
+
this.c[5].style.borderRadius = (r1*0.5) + 'px';
|
|
6515
6627
|
this.c[5].style.height = h1 + 'px';
|
|
6516
6628
|
this.c[5].style.top = (this.h*0.5)-(h1*0.5) + 'px';
|
|
6517
6629
|
|
|
6518
|
-
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;' );
|
|
6630
|
+
//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;' );
|
|
6631
|
+
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;' );
|
|
6519
6632
|
}
|
|
6520
6633
|
|
|
6521
6634
|
this.init();
|
|
@@ -6658,23 +6771,15 @@ class Slide extends Proto {
|
|
|
6658
6771
|
s[2].color = cc.text;
|
|
6659
6772
|
s[4].background = cc.back;
|
|
6660
6773
|
s[5].background = cc.text;
|
|
6774
|
+
if(this.model !== 0) s[6].background = cc.text;//cc.button;
|
|
6661
6775
|
break;
|
|
6662
6776
|
case 1: // scroll over
|
|
6663
6777
|
//s[2].border = '1px dashed ' + this.colors.hide;
|
|
6664
6778
|
s[2].color = cc.textOver;
|
|
6665
6779
|
s[4].background = cc.back;
|
|
6666
6780
|
s[5].background = cc.textOver;
|
|
6781
|
+
if(this.model !== 0) s[6].background = cc.textOver;//cc.overoff;
|
|
6667
6782
|
break;
|
|
6668
|
-
/* case 2:
|
|
6669
|
-
s[2].border = '1px solid ' + this.colors.borderSelect;
|
|
6670
|
-
break;
|
|
6671
|
-
case 3:
|
|
6672
|
-
s[2].border = '1px dashed ' + this.colors.text;//this.colors.borderSelect;
|
|
6673
|
-
break;
|
|
6674
|
-
case 4:
|
|
6675
|
-
s[2].border = '1px dashed ' + this.colors.hide;
|
|
6676
|
-
break;*/
|
|
6677
|
-
|
|
6678
6783
|
|
|
6679
6784
|
}
|
|
6680
6785
|
}
|
|
@@ -8910,6 +9015,6 @@ class Gui {
|
|
|
8910
9015
|
|
|
8911
9016
|
}
|
|
8912
9017
|
|
|
8913
|
-
const REVISION = '4.2.
|
|
9018
|
+
const REVISION = '4.2.2';
|
|
8914
9019
|
|
|
8915
9020
|
export { Files, Gui, Proto, REVISION, Tools, add };
|