uil 4.2.0 → 4.2.3

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.
@@ -969,8 +969,8 @@ const T = {
969
969
  if( o.fontSelect ) color.textSelect = o.fontSelect;
970
970
  if( o.groupBorder ) color.gborder = o.groupBorder;
971
971
 
972
- if( o.transparent ) o.bg = 'none';
973
- if( o.bg ) color.background = color.backgroundOver = o.bg;
972
+ //if( o.transparent ) o.bg = 'none'
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,9 +989,12 @@ const T = {
989
989
 
990
990
  colors: {
991
991
 
992
+ sx: 3,
993
+ sy: 3,
994
+
992
995
  content:'none',
993
- background: 'rgba(50,50,50,0.3)',
994
- backgroundOver: 'rgba(50,50,50,0.4)',
996
+ background: 'rgba(50,50,50,0.15)',
997
+ backgroundOver: 'rgba(50,50,50,0.3)',
995
998
 
996
999
  title : '#CCC',
997
1000
  titleoff : '#BBB',
@@ -999,17 +1002,15 @@ const T = {
999
1002
  textOver : '#EEE',
1000
1003
  textSelect : '#FFF',
1001
1004
 
1002
- //inputBg: 'rgba(0,0,0,0.25)',
1003
- //itemBg:'rgba(0,0,0,0.25)',
1004
-
1005
1005
  back:'rgba(0,0,0,0.2)',
1006
1006
  backoff:'rgba(0,0,0,0.3)',
1007
- //inputOver: 'rgba(0,0,0,0.2)',
1008
1007
 
1009
1008
  // input and button border
1010
1009
  border : '#4c4c4c',
1011
1010
  borderSize : 1,
1011
+
1012
1012
  gborder : 'none',
1013
+ groups : 'none',
1013
1014
 
1014
1015
  button : '#3c3c3c',
1015
1016
  overoff : '#5c5c5c',
@@ -1017,14 +1018,13 @@ const T = {
1017
1018
  select : '#308AFF',
1018
1019
  action: '#FF3300',
1019
1020
 
1020
-
1021
1021
  //fontFamily: 'Tahoma',
1022
- fontFamily: 'Consolas,monaco,monospace',
1022
+ fontFamily: 'Consolas, monospace',
1023
+ //fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
1023
1024
  fontWeight: 'normal',
1024
- fontShadow: '#000',
1025
+ fontShadow: 'none',//'#000',
1025
1026
  fontSize:12,
1026
1027
 
1027
-
1028
1028
  radius:4,
1029
1029
  hide: 'rgba(0,0,0,0)',
1030
1030
 
@@ -1034,21 +1034,21 @@ const T = {
1034
1034
 
1035
1035
  css : {
1036
1036
 
1037
- //unselect: '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
1038
1037
  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
- button:'display:flex; justify-content:center; align-items:center; text-align:center;',
1040
-
1041
- /*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
- 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+';',
1043
- item: T.css.txt + 'position:relative; background:rgba(0,0,0,0.2); margin-bottom:1px;',*/
1038
+ button:'display:flex; align-items:center; justify-content:center; text-align:center;',
1039
+ middle:'display:flex; align-items:center; justify-content:left; text-align:left; flex-direction: row-reverse;'
1044
1040
  },
1045
1041
 
1046
1042
  // svg path
1047
1043
 
1048
1044
  svgs: {
1049
1045
 
1046
+ 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',
1047
+ 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',
1048
+
1050
1049
  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
1050
  arrow:'M 3 8 L 8 5 3 2 3 8 Z',
1051
+
1052
1052
  arrowDown:'M 5 8 L 8 3 2 3 5 8 Z',
1053
1053
  arrowUp:'M 5 2 L 2 7 8 7 5 2 Z',
1054
1054
 
@@ -1110,16 +1110,18 @@ const T = {
1110
1110
  if( shadow === undefined ) shadow = cc.fontShadow;
1111
1111
  if( weight === undefined ) weight = cc.fontWeight;
1112
1112
  if( color === undefined ) color = cc.text;
1113
+
1114
+ if( isNaN(size) ){ if( size.search('em')===-1 ) size += 'px';}
1115
+ else size += 'px';
1113
1116
 
1114
1117
 
1115
- let align = 'display:flex; justify-content:left; align-items:center; text-align:left;';
1118
+ //let align = 'display:flex; justify-content:left; align-items:center; text-align:left;'
1116
1119
 
1117
- T.css.txt = T.css.basic + align + 'font-family:'+ font +'; font-weight:'+weight+'; font-size:'+size+'px; color:'+cc.text+'; padding:0px 10px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap;';
1120
+ T.css.txt = T.css.basic + T.css.middle + ' 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;';
1118
1121
  if( shadow !== 'none' ) T.css.txt += ' text-shadow: 1px 1px 1px '+shadow+';';
1119
1122
 
1120
1123
  T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';';
1121
- //T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; '//display:block; padding:4px 4px;';//
1122
- T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; display:block; padding:2px 4px;';//
1124
+ T.css.item = T.css.txt + 'padding:0px 4px; position:relative; margin-bottom:1px; ';
1123
1125
 
1124
1126
  },
1125
1127
 
@@ -1743,11 +1745,26 @@ class Files {
1743
1745
  case 'svg':
1744
1746
  t = [ { accept: { 'image/svg+xml': '.svg'} }, ];
1745
1747
  break;
1748
+ case 'wav':
1749
+ t = [ { accept: { 'audio/wav': '.wav'} }, ];
1750
+ break;
1751
+ case 'mp3':
1752
+ t = [ { accept: { 'audio/mpeg': '.mp3'} }, ];
1753
+ break;
1754
+ case 'mp4':
1755
+ t = [ { accept: { 'video/mp4': '.mp4'} }, ];
1756
+ break;
1757
+ case 'bin':case 'hex':
1758
+ t = [ { description: 'Binary Files', accept: { 'application/octet-stream': ['.bin', '.hex'] } }, ];
1759
+ break;
1746
1760
  case 'text':
1747
1761
  t = [ { description: 'Text Files', accept: { 'text/plain': ['.txt', '.text'], 'text/html': ['.html', '.htm'] } }, ];
1748
1762
  break;
1749
1763
  case 'json':
1750
- t = [ { description: 'JSON Files', accept: { 'text/plain': ['.json'] } }, ];
1764
+ t = [ { description: 'JSON Files', accept: { 'application/json': ['.json'] } }, ];//text/plain
1765
+ break;
1766
+ case 'js':
1767
+ t = [ { description: 'JavaScript Files', accept: { 'text/javascript': ['.js'] } }, ];
1751
1768
  break;
1752
1769
  case 'image':
1753
1770
  t = [ { description: 'Images', accept: { 'image/*': ['.png', '.gif', '.jpeg', '.jpg'] } }, ];
@@ -2156,7 +2173,7 @@ class Proto {
2156
2173
  this.fw = o.fw || 0;
2157
2174
 
2158
2175
  this.autoWidth = o.auto || true;// auto width or flex
2159
- this.isOpen = false;// open statu
2176
+ this.isOpen = false;//false// open statu
2160
2177
 
2161
2178
  // radius for toolbox
2162
2179
  this.radius = o.radius || this.colors.radius;
@@ -2234,6 +2251,7 @@ class Proto {
2234
2251
  this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent';
2235
2252
  this.s[0].borderBottom = (this.margin*0.5) + 'px solid transparent';
2236
2253
  } else {
2254
+ //this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent'
2237
2255
  this.s[0].borderBottom = this.margin + 'px solid transparent';
2238
2256
  }
2239
2257
 
@@ -2241,7 +2259,7 @@ class Proto {
2241
2259
 
2242
2260
  // with title
2243
2261
  if( !this.simple ){
2244
- this.c[1] = Tools.dom( 'div', this.css.txt );
2262
+ this.c[1] = Tools.dom( 'div', this.css.txt + this.css.middle );
2245
2263
  this.s[1] = this.c[1].style;
2246
2264
  this.c[1].textContent = this.name;
2247
2265
  this.s[1].color = this.lock ? this.colors.titleoff : this.colors.title;
@@ -2290,8 +2308,10 @@ class Proto {
2290
2308
  //if( this.autoHeight ) s[0].transition = 'height 0.01s ease-out';
2291
2309
  if( c[1] !== undefined && this.autoWidth ){
2292
2310
  s[1] = c[1].style;
2293
- s[1].height = (this.h-4) + 'px';
2294
- s[1].lineHeight = (this.h-8) + 'px';
2311
+ s[1].top = 1 + 'px';
2312
+ s[1].height = (this.h-2) + 'px';
2313
+ //s[1].height = (this.h-4) + 'px';
2314
+ // s[1].lineHeight = (this.h-8) + 'px';
2295
2315
  }
2296
2316
 
2297
2317
  let frag = Tools.frag;
@@ -2592,8 +2612,10 @@ class Proto {
2592
2612
  this.sb = this.w - this.sa;
2593
2613
  } else {
2594
2614
  let pp = this.w * ( this.p / 100 );
2595
- this.sa = Math.floor( pp + 10 );
2596
- this.sb = Math.floor( this.w - pp - 20 );
2615
+ //this.sa = Math.floor( pp + 10 )
2616
+ //this.sb = Math.floor( this.w - pp - 20 )
2617
+ this.sa = Math.floor( pp + 8 );
2618
+ this.sb = Math.floor( this.w - pp - 16 );
2597
2619
  }
2598
2620
 
2599
2621
  }
@@ -2696,7 +2718,7 @@ class Proto {
2696
2718
 
2697
2719
  if( this.isOpen ) return
2698
2720
  this.isOpen = true;
2699
- //Roots.needResize = true
2721
+ Roots.needResize = true;
2700
2722
  if( this.openCallback ) this.openCallback();
2701
2723
 
2702
2724
  }
@@ -2705,7 +2727,7 @@ class Proto {
2705
2727
 
2706
2728
  if( !this.isOpen ) return
2707
2729
  this.isOpen = false;
2708
- //Roots.needResize = true
2730
+ Roots.needResize = true;
2709
2731
  if( this.closeCallback ) this.closeCallback();
2710
2732
 
2711
2733
  }
@@ -2915,6 +2937,8 @@ class Button extends Proto {
2915
2937
  this.values = o.value || this.txt;
2916
2938
  if( o.values ) this.values = o.values;
2917
2939
 
2940
+ if( !o.values && !o.value ) this.txt = '';
2941
+
2918
2942
 
2919
2943
 
2920
2944
  this.onName = o.onName || null;
@@ -2957,7 +2981,7 @@ class Button extends Proto {
2957
2981
  //this.txt = ''
2958
2982
  }
2959
2983
  }
2960
- if( !this.txt ) this.p = 0;
2984
+ if( this.txt==='' ) this.p = 0;
2961
2985
 
2962
2986
  this.init();
2963
2987
 
@@ -3122,17 +3146,20 @@ class Button extends Proto {
3122
3146
  let d = this.sa;
3123
3147
 
3124
3148
  let i = this.lng;
3125
- let dc = this.space;
3126
- let size = Math.floor( ( w-(dc*(i-1)) ) / i );
3149
+ let sx = this.colors.sx; //this.space;
3150
+ //let size = Math.floor( ( w-(dc*(i-1)) ) / i );
3151
+ let size = ( ( w-(sx*(i-1)) ) / i );
3127
3152
 
3128
3153
  if( this.bw ){
3129
3154
  size = this.bw < size ? this.bw : size;
3130
- d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5);
3155
+ //d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5)
3156
+ d = ((this.w-( (size * i) + (sx * (i-1)) ))*0.5);
3131
3157
  }
3132
3158
 
3133
3159
  while( i-- ){
3134
3160
 
3135
- this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
3161
+ //this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
3162
+ this.tmp[i] = [ ( d + ( size * i ) + ( sx * i )), size ];
3136
3163
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
3137
3164
 
3138
3165
  s[i+2].left = this.tmp[i][0] + 'px';
@@ -3845,13 +3872,15 @@ class Fps extends Proto {
3845
3872
  }
3846
3873
 
3847
3874
 
3848
- let fltop = Math.floor(this.h*0.5)-6;
3875
+ let fltop = Math.floor(this.h*0.5)-3;
3876
+ const ccc = this.colors;
3849
3877
 
3850
3878
  this.c[1].textContent = this.txt;
3879
+ //this.c[1].innerHTML = '&#160;' + this.txt
3851
3880
  this.c[0].style.cursor = 'pointer';
3852
3881
  this.c[0].style.pointerEvents = 'auto';
3853
3882
 
3854
- 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 '+ this.colors.border +';';
3883
+ 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 +';';
3855
3884
 
3856
3885
  if( this.radius !== 0 ) panelCss += 'border-radius:' + this.radius+'px;';
3857
3886
 
@@ -3867,7 +3896,8 @@ class Fps extends Proto {
3867
3896
  //this.dom( 'path', null, { fill:'rgba(0,255,255,0.3)', 'stroke-width':1, stroke:'#0FF', 'vector-effect':'non-scaling-stroke' }, this.c[2] );
3868
3897
 
3869
3898
  // arrow
3870
- 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'});
3899
+ 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'});
3900
+ //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'});
3871
3901
 
3872
3902
  // result test
3873
3903
  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;' );
@@ -3877,15 +3907,18 @@ class Fps extends Proto {
3877
3907
 
3878
3908
  this.isShow = false;
3879
3909
 
3910
+
3911
+
3880
3912
  let s = this.s;
3881
3913
 
3882
- s[1].marginLeft = '10px';
3914
+ //s[1].marginLeft = '10px';
3883
3915
  s[1].lineHeight = this.h-4;
3884
- s[1].color = this.colors.text;
3885
- s[1].fontWeight = 'bold';
3916
+ s[1].color = ccc.text;
3917
+ //s[1].paddingLeft = '18px';
3918
+ //s[1].fontWeight = 'bold';
3886
3919
 
3887
3920
  if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
3888
- if( this.colors.gborder!=='none') s[0].border = '1px solid ' + this.colors.gborder;
3921
+ if( this.colors.gborder!=='none') s[0].border = '1px solid ' + ccc.gborder;
3889
3922
 
3890
3923
 
3891
3924
 
@@ -4004,7 +4037,7 @@ class Fps extends Proto {
4004
4037
 
4005
4038
  this.h = this.hplus + this.baseH;
4006
4039
 
4007
- this.setSvg( this.c[3], 'd', this.svgs.arrowDown );
4040
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
4008
4041
 
4009
4042
  if( this.group !== null ){ this.group.calc( this.hplus );}
4010
4043
  else if( this.isUI ) this.main.calc( this.hplus );
@@ -4024,7 +4057,7 @@ class Fps extends Proto {
4024
4057
 
4025
4058
  this.h = this.baseH;
4026
4059
 
4027
- this.setSvg( this.c[3], 'd', this.svgs.arrow );
4060
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4028
4061
 
4029
4062
  if( this.group !== null ){ this.group.calc( -this.hplus );}
4030
4063
  else if( this.isUI ) this.main.calc( -this.hplus );
@@ -4095,6 +4128,8 @@ class Fps extends Proto {
4095
4128
  let s = this.s;
4096
4129
  let w = this.w;
4097
4130
 
4131
+ s[3].left = ( this.sa + this.sb - 6 ) + 'px';
4132
+
4098
4133
  s[0].width = w + 'px';
4099
4134
  s[1].width = w + 'px';
4100
4135
  s[2].left = 10 + 'px';
@@ -4429,46 +4464,61 @@ class Group extends Proto {
4429
4464
  this.current = -1;
4430
4465
  this.proto = null;
4431
4466
  this.isEmpty = true;
4432
- this.decal = 0;
4433
4467
 
4434
- this.baseH = this.h;
4435
-
4436
- let fltop = Math.floor(this.h*0.5)-6;
4468
+ this.decal = o.group ? 8 : 0;
4437
4469
 
4438
- this.isLine = o.line !== undefined ? o.line : false;
4470
+ this.baseH = this.h;
4439
4471
 
4440
- this.decal = 0;
4472
+ let fltop = Math.floor(this.h*0.5)-3;
4441
4473
 
4442
- if( o.group ){
4443
- this.decal = o.group.decal ? o.group.decal : 0;
4444
- this.decal += 6;
4445
- }
4474
+ const cc = this.colors;
4446
4475
 
4447
4476
  this.useFlex = true;
4448
4477
  let flexible = this.useFlex ? 'display:flex; flex-flow: row wrap;' : '';
4449
4478
 
4450
- this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+this.h+'px');//
4451
- 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:this.colors.text, stroke:'none'});
4452
- this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; left:'+(4+this.decal)+'px; top:'+fltop+'px;', { d:this.svgs.arrow, fill:this.colors.text, stroke:'none'});
4453
- // bottom line
4454
- 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');
4479
+ this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+(this.h)+'px');
4480
+ 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'});
4455
4481
 
4456
- let s = this.s;
4457
- s[0].height = this.h + 'px';
4458
- s[1].height = this.h + 'px';
4482
+ this.s;
4459
4483
  this.c[1].name = 'group';
4460
4484
 
4461
- s[1].marginLeft = (10+this.decal)+'px';
4462
- s[1].lineHeight = this.h-4;
4463
- s[1].color = this.colors.text;
4464
- s[1].fontWeight = 'bold';
4465
-
4466
- if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
4467
4485
  this.init();
4468
4486
 
4469
4487
  this.setBG( o.bg );
4470
4488
 
4471
- if( o.open !== undefined ) this.open();
4489
+ if( o.open ) this.open();
4490
+
4491
+ }
4492
+
4493
+ setBG ( bg ) {
4494
+
4495
+ const cc = this.colors;
4496
+ const s = this.s;
4497
+
4498
+ if( bg !== undefined ) cc.groups = bg;
4499
+ if(cc.groups === 'none') cc.groups = cc.background;
4500
+ cc.background = 'none';
4501
+
4502
+ s[0].background = 'none';
4503
+ s[1].background = cc.groups;
4504
+ s[2].background = cc.groups;
4505
+
4506
+ if( cc.gborder !== 'none' ){
4507
+ s[1].border = cc.borderSize+'px solid '+ cc.gborder;
4508
+ }
4509
+
4510
+ if( this.radius !== 0 ){
4511
+
4512
+ s[1].borderRadius = this.radius+'px';
4513
+ s[2].borderRadius = this.radius+'px';
4514
+
4515
+ }
4516
+
4517
+ /*let i = this.uis.length;
4518
+ while(i--){
4519
+ this.uis[i].setBG( 'none' );
4520
+ //this.uis[i].setBG( this.colors.background );
4521
+ }*/
4472
4522
 
4473
4523
  }
4474
4524
 
@@ -4572,18 +4622,7 @@ class Group extends Proto {
4572
4622
 
4573
4623
  // ----------------------
4574
4624
 
4575
- setBG ( bg ) {
4576
-
4577
- if( bg !== undefined ) this.colors.background = bg;
4578
-
4579
- this.c[0].style.background = this.colors.background;
4580
-
4581
- let i = this.uis.length;
4582
- while(i--){
4583
- this.uis[i].setBG( this.colors.background );
4584
- }
4585
-
4586
- }
4625
+
4587
4626
 
4588
4627
  add() {
4589
4628
 
@@ -4682,11 +4721,35 @@ class Group extends Proto {
4682
4721
 
4683
4722
  super.open();
4684
4723
 
4685
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
4724
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
4686
4725
  this.rSizeContent();
4687
4726
 
4688
4727
  this.h - this.baseH;
4689
4728
 
4729
+ const s = this.s;
4730
+ const cc = this.colors;
4731
+
4732
+ s[2].top = (this.h-1) + 'px';
4733
+
4734
+ if(this.radius){
4735
+
4736
+ s[1].borderRadius = '0px';
4737
+ s[2].borderRadius = '0px';
4738
+
4739
+ s[1].borderTopLeftRadius = this.radius+'px';
4740
+ s[1].borderTopRightRadius = this.radius+'px';
4741
+ s[2].borderBottomLeftRadius = this.radius+'px';
4742
+ s[2].borderBottomRightRadius = this.radius+'px';
4743
+ }
4744
+
4745
+ if( cc.gborder !== 'none' ){
4746
+
4747
+ s[2].border = cc.borderSize+'px solid '+ cc.gborder;
4748
+ s[2].borderTop = 'none';
4749
+ s[1].borderBottom = cc.borderSize+'px solid rgba(0,0,0,0)';
4750
+
4751
+ }
4752
+
4690
4753
  this.parentHeight();
4691
4754
 
4692
4755
  }
@@ -4697,9 +4760,24 @@ class Group extends Proto {
4697
4760
 
4698
4761
  this.h - this.baseH;
4699
4762
 
4700
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
4763
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4764
+
4701
4765
  this.h = this.baseH;
4702
- this.s[0].height = this.h + 'px';
4766
+
4767
+ const s = this.s;
4768
+ const cc = this.colors;
4769
+
4770
+ s[0].height = this.h + 'px';
4771
+ //s[1].height = (this.h-2) + 'px'
4772
+ s[2].top = this.h + 'px';
4773
+
4774
+ if( cc.gborder !== 'none' ){
4775
+
4776
+ s[2].border = 'none';
4777
+ s[1].border = cc.borderSize+'px solid '+ cc.gborder;
4778
+ }
4779
+
4780
+ if(this.radius) s[1].borderRadius = this.radius+'px';
4703
4781
 
4704
4782
  this.parentHeight();
4705
4783
 
@@ -4746,9 +4824,15 @@ class Group extends Proto {
4746
4824
 
4747
4825
  let s = this.s;
4748
4826
 
4749
- s[3].left = ( this.sa + this.sb - 17 ) + 'px';
4827
+ this.w = this.w - this.decal;
4828
+
4829
+ s[3].left = ( this.sa + this.sb - 6 ) + 'px';
4830
+ //s[1].width = this.isbgGroup ? (this.w-5) + 'px' : this.w + 'px'
4831
+
4750
4832
  s[1].width = this.w + 'px';
4751
4833
  s[2].width = this.w + 'px';
4834
+ s[1].left = (this.decal) + 'px';
4835
+ s[2].left = (this.decal) + 'px';
4752
4836
 
4753
4837
  if( this.isOpen ) this.rSizeContent();
4754
4838
 
@@ -5271,9 +5355,10 @@ class List extends Proto {
5271
5355
  this.tmpImage = {};
5272
5356
  this.tmpUrl = [];
5273
5357
 
5274
- //this.autoHeight = false;
5358
+ this.m = o.m !== undefined ? o.m : 5;
5275
5359
 
5276
- let align = o.align || 'center';
5360
+
5361
+ let align = o.align || 'left';
5277
5362
 
5278
5363
  // scroll size
5279
5364
  let ss = o.scrollSize || 10;
@@ -5292,14 +5377,12 @@ class List extends Proto {
5292
5377
  if( this.txt === '' ) this.p = 0;
5293
5378
 
5294
5379
 
5295
- let fltop = Math.floor(this.h*0.5)-5;
5380
+ let fltop = Math.floor(this.h*0.5)-3;
5296
5381
  let cc = this.colors;
5297
5382
 
5298
-
5299
-
5300
5383
  this.c[2] = this.dom( 'div', this.css.basic + 'top:0; display:none; border-radius:'+this.radius+'px;' );
5301
- 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;' );
5302
- this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:10px; height:10px; top:'+fltop+'px;', { d:this.svgs.arrow, fill:cc.text, stroke:'none'});
5384
+ this.c[3] = this.dom( 'div', this.css.item + 'padding:0px '+this.m+'px; margin-bottom:0px; position:absolute; justify-content:'+align+'; 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;' );
5385
+ 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'});
5303
5386
 
5304
5387
  this.scrollerBack = this.dom( 'div', this.css.basic + 'right:0px; width:'+ss+'px; background:'+cc.back+'; display:none;');
5305
5388
  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; ');
@@ -5310,12 +5393,12 @@ class List extends Proto {
5310
5393
  this.list = [];
5311
5394
  this.refObject = null;
5312
5395
 
5313
- if(o.list){
5396
+ if( o.list ){
5314
5397
  if( o.list instanceof Array ){
5315
5398
  this.list = o.list;
5316
- } else {
5399
+ } else if( o.list instanceof Object ){
5317
5400
  this.refObject = o.list;
5318
- for( let g in this.refObject ) this.list.push(g);
5401
+ for( let g in this.refObject ) this.list.push( g );
5319
5402
  }
5320
5403
  }
5321
5404
 
@@ -5325,7 +5408,7 @@ class List extends Proto {
5325
5408
 
5326
5409
  this.baseH = this.h;
5327
5410
 
5328
- this.itemHeight = o.itemHeight || (this.h-3);
5411
+ this.itemHeight = o.itemHeight || this.h;//(this.h-3);
5329
5412
 
5330
5413
  // force full list
5331
5414
  this.full = o.full || false;
@@ -5346,7 +5429,6 @@ class List extends Proto {
5346
5429
  this.c[2].style.top = 'auto';
5347
5430
  this.c[3].style.top = 'auto';
5348
5431
  this.c[4].style.top = 'auto';
5349
- //this.c[5].style.top = 'auto';
5350
5432
 
5351
5433
  this.c[2].style.bottom = this.h-2 + 'px';
5352
5434
  this.c[3].style.bottom = '1px';
@@ -5359,8 +5441,6 @@ class List extends Proto {
5359
5441
  this.listIn = this.dom( 'div', this.css.basic + 'left:0; top:0; width:100%; background:none;');
5360
5442
  this.listIn.name = 'list';
5361
5443
 
5362
-
5363
-
5364
5444
  this.topList = 0;
5365
5445
 
5366
5446
  this.c[2].appendChild( this.listIn );
@@ -5399,22 +5479,13 @@ class List extends Proto {
5399
5479
 
5400
5480
  //this.c[0].style.background = '#FF0000'
5401
5481
  if( this.isWithImage ) this.preloadImage();
5402
- // } else {
5403
- // populate list
5404
- this.setList( this.list );
5405
- this.init();
5406
- if( this.isOpenOnStart ) this.open( true );
5407
- // }
5482
+
5483
+ this.setList( this.list );
5484
+ this.init();
5485
+ if( this.isOpenOnStart ) this.open( true );
5408
5486
 
5409
5487
  }
5410
5488
 
5411
- /*send ( v ) {
5412
-
5413
- super.send( v );
5414
-
5415
- //Proto.prototype.send.call( this, v );
5416
- }*/
5417
-
5418
5489
  // image list
5419
5490
 
5420
5491
  preloadImage () {
@@ -5604,9 +5675,9 @@ class List extends Proto {
5604
5675
  this.value = this.list[ this.current.id ];
5605
5676
 
5606
5677
  if( this.isSelectable ) this.selected();
5607
- //this.value = this.refObject !== null ? this.refObject[this.list[this.current.id]] : this.list[this.current.id]
5608
- //this.value = this.current.textContent;
5609
- this.send( this.refObject !== null ? this.refObject[this.list[this.current.id]] : this.value );
5678
+
5679
+ //this.send( this.refObject !== null ? this.refObject[ this.list[this.current.id]] : this.value );
5680
+ this.send( this.value );
5610
5681
 
5611
5682
  if( !this.listOnly ) {
5612
5683
  this.close();
@@ -5781,8 +5852,8 @@ class List extends Proto {
5781
5852
  for( let i=0; i<this.length; i++ ){
5782
5853
 
5783
5854
  n = this.list[i];
5784
- item = this.dom( 'div', this.css.item + 'width:'+this.ww+'px; height:'+this.itemHeight+'px; line-height:'+(this.itemHeight-5)+'px; color:'+this.colors.text+'; background:'+this.colors.back+';' );
5785
- item.name = 'item'+i;
5855
+ item = this.dom( 'div', this.css.item + 'padding:0px '+(this.m+1)+'px; width:'+this.ww+'px; height:'+this.itemHeight+'px; line-height:'+(this.itemHeight-2)+'px; color:'+this.colors.text+'; background:'+this.colors.back+';' );
5856
+ item.name = 'item'+ i;
5786
5857
  item.id = i;
5787
5858
  item.select = false;
5788
5859
  item.posy = (this.itemHeight+1)*i;
@@ -5799,6 +5870,8 @@ class List extends Proto {
5799
5870
  let c = new Image();
5800
5871
  c.src = this.tmpCanvas.toDataURL();
5801
5872
 
5873
+ //item.style.marginLeft = (this.imageSize[0]+8)+'px'
5874
+
5802
5875
 
5803
5876
  /*let c = document.createElement('canvas')
5804
5877
 
@@ -5807,7 +5880,11 @@ class List extends Proto {
5807
5880
  let ctx = c.getContext("2d")
5808
5881
  ctx.fillStyle = this.canvasBg
5809
5882
  ctx.fillRect(0, 0, this.imageSize[0], this.imageSize[1])*/
5810
- c.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px';
5883
+
5884
+ //c.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px'
5885
+ // c.style.cssText =' flex-shrink: 0;'
5886
+
5887
+ c.style.cssText ='margin-right:4px;';
5811
5888
 
5812
5889
 
5813
5890
  //c.style.cssText = 'display:flex; align-content: flex-start; flex-wrap: wrap;'
@@ -5818,12 +5895,12 @@ class List extends Proto {
5818
5895
 
5819
5896
  }
5820
5897
 
5821
- if(this.dragout){
5898
+ if( this.dragout ){
5822
5899
 
5823
5900
  item.img = this.tmpImage[n];
5824
5901
 
5825
5902
  item.style.pointerEvents = 'auto';
5826
- item.draggable="true";
5903
+ item.draggable = "true";
5827
5904
 
5828
5905
  item.addEventListener('dragstart', this.dragstart || function(){ /*console.log('drag start')*/});
5829
5906
  item.addEventListener('drag', this.drag || function(){ /*console.log('drag start')*/});
@@ -5843,6 +5920,7 @@ class List extends Proto {
5843
5920
  }
5844
5921
 
5845
5922
  drawImage( name, image, x,y,w,h ){
5923
+
5846
5924
  this.tmpCtx.clearRect(0, 0, this.imageSize[0], this.imageSize[1]);
5847
5925
  this.tmpCtx.drawImage(image, x, y, w, h, 0, 0, this.imageSize[0], this.imageSize[1]);
5848
5926
  this.tmpImage[name].src = this.tmpCanvas.toDataURL();
@@ -5873,18 +5951,20 @@ class List extends Proto {
5873
5951
 
5874
5952
  setTopItem (){
5875
5953
 
5876
- if(this.staticTop) return;
5954
+ if( this.staticTop ) return;
5877
5955
 
5878
- if( this.isWithImage ){
5956
+ if( this.isWithImage ){
5879
5957
 
5880
- if( !this.preLoadComplete ) return;
5958
+ if(!this.preLoadComplete ) return;
5881
5959
 
5882
5960
  if(!this.c[3].children.length){
5883
5961
  this.canvas = document.createElement('canvas');
5884
5962
  this.canvas.width = this.imageSize[0];
5885
5963
  this.canvas.height = this.imageSize[1];
5886
- this.canvas.style.cssText = 'position:absolute; top:0px; left:0px;';
5964
+ this.canvas.style.cssText ='margin-right:4px;';
5887
5965
  this.ctx = this.canvas.getContext("2d");
5966
+ this.c[3].style.textAlign = 'left';
5967
+ this.c[3].style.justifyContent = 'left';
5888
5968
  this.c[3].appendChild( this.canvas );
5889
5969
  }
5890
5970
 
@@ -5901,13 +5981,11 @@ class List extends Proto {
5901
5981
  this.canvas = document.createElement('canvas');
5902
5982
  this.canvas.width = this.imageSize[0];
5903
5983
  this.canvas.height = this.imageSize[1];
5904
- ( this.h - this.imageSize[1] ) * 0.5;
5905
- this.canvas.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px';
5906
- //this.canvas.style.cssText = 'position:absolute; top:'+h+'px; left:5px;'
5984
+ this.canvas.style.cssText ='margin-right:4px;';
5907
5985
  this.ctx = this.canvas.getContext("2d");
5908
5986
  this.c[3].style.textAlign = 'left';
5987
+ this.c[3].style.justifyContent = 'left';
5909
5988
  this.c[3].appendChild( this.canvas );
5910
-
5911
5989
  }
5912
5990
 
5913
5991
  this.ctx.drawImage( this.tmpImage[ this.value ], 0, 0 );
@@ -5964,9 +6042,9 @@ class List extends Proto {
5964
6042
 
5965
6043
  if( this.up ){
5966
6044
  this.zone.y -= this.h - (this.baseH-10);
5967
- this.setSvg( this.c[4], 'd', this.svgs.arrowUp );
6045
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5968
6046
  } else {
5969
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
6047
+ this.setSvg( this.c[4], 'd', this.svgs.g2 );
5970
6048
  }
5971
6049
 
5972
6050
  this.rSizeContent();
@@ -5990,7 +6068,7 @@ class List extends Proto {
5990
6068
  this.h = this.baseH;
5991
6069
  this.s[0].height = this.h + 'px';
5992
6070
  this.s[2].display = 'none';
5993
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
6071
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5994
6072
 
5995
6073
  this.zone.h = this.h;
5996
6074
 
@@ -6031,7 +6109,7 @@ class List extends Proto {
6031
6109
  s[3].width = w + 'px';
6032
6110
  s[3].left = d + 'px';
6033
6111
 
6034
- s[4].left = d + w - 17 + 'px';
6112
+ s[4].left = d + w - 15 + 'px';
6035
6113
 
6036
6114
  this.ww = w;
6037
6115
  if( this.max > this.maxHeight ) this.ww = w-this.ss;
@@ -6436,12 +6514,15 @@ class Numeric extends Proto {
6436
6514
  rSize () {
6437
6515
 
6438
6516
  super.rSize();
6439
-
6440
- let w = Math.floor( ( this.sb + 5 ) / this.lng )-5;
6517
+ let sx = this.colors.sx;
6518
+ let ss = sx * (this.lng-1);
6519
+ let w = (this.sb-ss) / this.lng;//(( this.sb + sx ) / this.lng )-sx
6441
6520
  let s = this.s;
6442
6521
  let i = this.lng;
6522
+
6443
6523
  while(i--){
6444
- this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
6524
+ //this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
6525
+ this.tmp[i] = [ ( this.sa + ( w * i )+( sx * i )), w ];
6445
6526
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
6446
6527
  s[ 3 + i ].left = this.tmp[i][0] + 'px';
6447
6528
  s[ 3 + i ].width = this.tmp[i][1] + 'px';
@@ -6492,25 +6573,27 @@ class Slide extends Proto {
6492
6573
 
6493
6574
  if(this.model !== 0){
6494
6575
 
6495
- let h1 = 4, h2 = 8, ww = this.h-4, ra = 20;
6576
+ let r1 = 4, h1 = 4, h2 = 8, ww = this.h-6, ra = 16;
6496
6577
 
6497
6578
  if( this.model === 2 ){
6498
- h1 = 4;//2
6499
- h2 = 8;
6579
+ r1 = 0;
6580
+ h1 = 2;
6581
+ h2 = 4;
6500
6582
  ra = 2;
6501
- ww = (this.h-4)*0.5;
6583
+ ww = (this.h-6)*0.5;
6502
6584
  }
6503
6585
 
6504
- if(this.model === 3) this.c[5].style.visible = 'none';
6586
+ if( this.model === 3 ) this.c[5].style.visible = 'none';
6505
6587
 
6506
- this.c[4].style.borderRadius = h1 + 'px';
6588
+ this.c[4].style.borderRadius = r1 + 'px';
6507
6589
  this.c[4].style.height = h2 + 'px';
6508
6590
  this.c[4].style.top = (this.h*0.5) - h1 + 'px';
6509
- this.c[5].style.borderRadius = (h1*0.5) + 'px';
6591
+ this.c[5].style.borderRadius = (r1*0.5) + 'px';
6510
6592
  this.c[5].style.height = h1 + 'px';
6511
6593
  this.c[5].style.top = (this.h*0.5)-(h1*0.5) + 'px';
6512
6594
 
6513
- 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;' );
6595
+ //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;' );
6596
+ 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;' );
6514
6597
  }
6515
6598
 
6516
6599
  this.init();
@@ -6653,23 +6736,15 @@ class Slide extends Proto {
6653
6736
  s[2].color = cc.text;
6654
6737
  s[4].background = cc.back;
6655
6738
  s[5].background = cc.text;
6739
+ if(this.model !== 0) s[6].background = cc.text;//cc.button;
6656
6740
  break;
6657
6741
  case 1: // scroll over
6658
6742
  //s[2].border = '1px dashed ' + this.colors.hide;
6659
6743
  s[2].color = cc.textOver;
6660
6744
  s[4].background = cc.back;
6661
6745
  s[5].background = cc.textOver;
6746
+ if(this.model !== 0) s[6].background = cc.textOver;//cc.overoff;
6662
6747
  break;
6663
- /* case 2:
6664
- s[2].border = '1px solid ' + this.colors.borderSelect;
6665
- break;
6666
- case 3:
6667
- s[2].border = '1px dashed ' + this.colors.text;//this.colors.borderSelect;
6668
- break;
6669
- case 4:
6670
- s[2].border = '1px dashed ' + this.colors.hide;
6671
- break;*/
6672
-
6673
6748
 
6674
6749
  }
6675
6750
  }
@@ -7213,11 +7288,6 @@ class Bitmap extends Proto {
7213
7288
  let up = false;
7214
7289
 
7215
7290
  let name = this.testZone( e );
7216
- //let sel = false;
7217
-
7218
-
7219
-
7220
- //console.log(name)
7221
7291
 
7222
7292
  if( name === 'over' ){
7223
7293
  this.cursor('pointer');
@@ -7256,7 +7326,7 @@ class Bitmap extends Proto {
7256
7326
 
7257
7327
  if( this.img !== null ){
7258
7328
  if( this.objectLink !== null ) this.objectLink[ this.val ] = v;
7259
- if( this.callback ) this.callback( v, this.img, this.name );
7329
+ if( this.callback ) this.callback( this.value, this.img, this.name );
7260
7330
  }
7261
7331
 
7262
7332
  }
@@ -7278,15 +7348,6 @@ class Bitmap extends Proto {
7278
7348
 
7279
7349
  if( this.stat !== n ){
7280
7350
 
7281
- /*if( n===1 ) this.isActif = false
7282
-
7283
- if( n===3 ){
7284
- if( !this.isActif ){ this.isActif = true; n=4; this.onActif( this ); }
7285
- else { this.isActif = false; }
7286
- }
7287
-
7288
- if( n===2 && this.isActif ) n = 4;*/
7289
-
7290
7351
  this.stat = n;
7291
7352
 
7292
7353
  switch( n ){
@@ -8065,7 +8126,7 @@ const add = function () {
8065
8126
 
8066
8127
  o = a[2];
8067
8128
  o.name = a[1];
8068
- if( type === 'list' ){ o.list = a[0][a[1]]; }
8129
+ if( type === 'list' && !o.list ){ o.list = a[0][a[1]]; }
8069
8130
  else o.value = a[0][a[1]];
8070
8131
 
8071
8132
  }
@@ -8167,7 +8228,6 @@ class Gui {
8167
8228
 
8168
8229
  // color
8169
8230
  if( o.config ) o.colors = o.config;
8170
-
8171
8231
  if ( o.colors ) this.setConfig( o.colors );
8172
8232
  else this.colors = Tools.defineColor( o );
8173
8233
 
@@ -8906,6 +8966,6 @@ class Gui {
8906
8966
 
8907
8967
  }
8908
8968
 
8909
- const REVISION = '4.2.0';
8969
+ const REVISION = '4.2.3';
8910
8970
 
8911
8971
  export { Files, Gui, Proto, REVISION, Tools, add };