uil 4.1.0 → 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.
@@ -21,7 +21,8 @@ const R = {
21
21
  current:-1,
22
22
 
23
23
  needReZone: true,
24
- isEventsInit: false,
24
+ needResize:false,
25
+ isEventsInit: false,
25
26
  isLeave:false,
26
27
 
27
28
  downTime:0,
@@ -179,8 +180,6 @@ const R = {
179
180
 
180
181
  resize: function () {
181
182
 
182
- R.needReZone = true;
183
-
184
183
  let i = R.ui.length, u;
185
184
 
186
185
  while( i-- ){
@@ -190,6 +189,9 @@ const R = {
190
189
 
191
190
  }
192
191
 
192
+ R.needReZone = true;
193
+ R.needResize = false;
194
+
193
195
  },
194
196
 
195
197
  out: function () {
@@ -223,6 +225,8 @@ const R = {
223
225
 
224
226
  if( R.prevDefault.indexOf( event.type ) !== -1 ) event.preventDefault();
225
227
 
228
+ if( R.needResize ) R.resize();
229
+
226
230
  R.findZone();
227
231
 
228
232
  let e = R.e;
@@ -966,7 +970,7 @@ const T = {
966
970
  if( o.groupBorder ) color.gborder = o.groupBorder;
967
971
 
968
972
  if( o.transparent ) o.bg = 'none';
969
- if( o.bg ) color.background = color.backgroundOver = o.bg;
973
+ //if( o.bg ) color.background = color.backgroundOver = o.bg
970
974
  if( o.bgOver ) color.backgroundOver = o.bgOver;
971
975
 
972
976
  for( let m in color ){
@@ -985,6 +989,9 @@ const T = {
985
989
 
986
990
  colors: {
987
991
 
992
+ sx: 3,
993
+ sy: 3,
994
+
988
995
  content:'none',
989
996
  background: 'rgba(50,50,50,0.3)',
990
997
  backgroundOver: 'rgba(50,50,50,0.4)',
@@ -1007,6 +1014,7 @@ const T = {
1007
1014
  borderSize : 1,
1008
1015
  gborder : 'none',
1009
1016
 
1017
+ groups : 'none',
1010
1018
  button : '#3c3c3c',
1011
1019
  overoff : '#5c5c5c',
1012
1020
  over : '#024699',
@@ -1015,13 +1023,13 @@ const T = {
1015
1023
 
1016
1024
 
1017
1025
  //fontFamily: 'Tahoma',
1018
- fontFamily: 'Consolas,monaco,monospace',
1026
+ fontFamily: 'Consolas, monospace',
1027
+ //fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
1019
1028
  fontWeight: 'normal',
1020
- fontShadow: '#000',
1029
+ fontShadow: 'none',//'#000',
1021
1030
  fontSize:12,
1022
1031
 
1023
-
1024
- radius:4,
1032
+ radius:3,
1025
1033
  hide: 'rgba(0,0,0,0)',
1026
1034
 
1027
1035
  },
@@ -1033,6 +1041,7 @@ const T = {
1033
1041
  //unselect: '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
1034
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;',
1035
1043
  button:'display:flex; justify-content:center; align-items:center; text-align:center;',
1044
+ middle:'display:flex; align-items:center;',
1036
1045
 
1037
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;',
1038
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+';',
@@ -1043,6 +1052,9 @@ const T = {
1043
1052
 
1044
1053
  svgs: {
1045
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
+
1046
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',
1047
1059
  arrow:'M 3 8 L 8 5 3 2 3 8 Z',
1048
1060
  arrowDown:'M 5 8 L 8 3 2 3 5 8 Z',
@@ -1063,9 +1075,13 @@ const T = {
1063
1075
  object:'M 10 1 L 7 4 4 1 1 1 1 13 4 13 4 5 7 8 10 5 10 13 13 13 13 1 10 1 Z',
1064
1076
  none:'M 9 5 L 5 5 5 9 9 9 9 5 Z',
1065
1077
  cursor:'M 4 7 L 1 10 1 12 2 13 4 13 7 10 9 14 14 0 0 5 4 7 Z',
1078
+ load:'M 14 8 L 12 8 12 12 2 12 2 8 0 8 0 14 14 14 14 8 M 8 5 L 8 0 6 0 6 5 3 5 7 9 11 5 8 5 Z',
1066
1079
 
1067
1080
  },
1068
1081
 
1082
+ rezone () {
1083
+ Roots.needReZone = true;
1084
+ },
1069
1085
 
1070
1086
  getImput: function(){
1071
1087
 
@@ -1102,17 +1118,22 @@ const T = {
1102
1118
  if( shadow === undefined ) shadow = cc.fontShadow;
1103
1119
  if( weight === undefined ) weight = cc.fontWeight;
1104
1120
  if( color === undefined ) color = cc.text;
1121
+
1122
+ if( isNaN(size) ){ if( size.search('em')===-1 ) size += 'px';}
1123
+ else size += 'px';
1105
1124
 
1106
1125
 
1107
1126
  let align = 'display:flex; justify-content:left; align-items:center; text-align:left;';
1108
1127
 
1109
- 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;';
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;';
1110
1129
  if( shadow !== 'none' ) T.css.txt += ' text-shadow: 1px 1px 1px '+shadow+';';
1111
1130
 
1112
1131
  T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';';
1113
1132
  //T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; '//display:block; padding:4px 4px;';//
1114
1133
  T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; display:block; padding:2px 4px;';//
1115
1134
 
1135
+ //console.log( T.css.txt )
1136
+
1116
1137
  },
1117
1138
 
1118
1139
 
@@ -1735,11 +1756,26 @@ class Files {
1735
1756
  case 'svg':
1736
1757
  t = [ { accept: { 'image/svg+xml': '.svg'} }, ];
1737
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;
1738
1771
  case 'text':
1739
1772
  t = [ { description: 'Text Files', accept: { 'text/plain': ['.txt', '.text'], 'text/html': ['.html', '.htm'] } }, ];
1740
1773
  break;
1741
1774
  case 'json':
1742
- t = [ { description: 'JSON Files', accept: { 'text/plain': ['.json'] } }, ];
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'] } }, ];
1743
1779
  break;
1744
1780
  case 'image':
1745
1781
  t = [ { description: 'Images', accept: { 'image/*': ['.png', '.gif', '.jpeg', '.jpg'] } }, ];
@@ -1817,6 +1853,7 @@ class Files {
1817
1853
  } catch(e) {
1818
1854
 
1819
1855
  console.log(e);
1856
+ if( o.callback ) o.callback( null );
1820
1857
 
1821
1858
  }
1822
1859
 
@@ -2147,7 +2184,7 @@ class Proto {
2147
2184
  this.fw = o.fw || 0;
2148
2185
 
2149
2186
  this.autoWidth = o.auto || true;// auto width or flex
2150
- this.isOpen = false;// open statu
2187
+ this.isOpen = false;//false// open statu
2151
2188
 
2152
2189
  // radius for toolbox
2153
2190
  this.radius = o.radius || this.colors.radius;
@@ -2184,7 +2221,7 @@ class Proto {
2184
2221
  // for listening object
2185
2222
  this.objectLink = null;
2186
2223
  this.isSend = false;
2187
- this.val = null;
2224
+ this.objectKey = null;
2188
2225
 
2189
2226
  this.txt = o.name || '';
2190
2227
  this.name = o.rename || this.txt;
@@ -2225,6 +2262,7 @@ class Proto {
2225
2262
  this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent';
2226
2263
  this.s[0].borderBottom = (this.margin*0.5) + 'px solid transparent';
2227
2264
  } else {
2265
+ //this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent'
2228
2266
  this.s[0].borderBottom = this.margin + 'px solid transparent';
2229
2267
  }
2230
2268
 
@@ -2232,7 +2270,7 @@ class Proto {
2232
2270
 
2233
2271
  // with title
2234
2272
  if( !this.simple ){
2235
- this.c[1] = Tools.dom( 'div', this.css.txt );
2273
+ this.c[1] = Tools.dom( 'div', this.css.txt + this.css.middle );
2236
2274
  this.s[1] = this.c[1].style;
2237
2275
  this.c[1].textContent = this.name;
2238
2276
  this.s[1].color = this.lock ? this.colors.titleoff : this.colors.title;
@@ -2281,8 +2319,10 @@ class Proto {
2281
2319
  //if( this.autoHeight ) s[0].transition = 'height 0.01s ease-out';
2282
2320
  if( c[1] !== undefined && this.autoWidth ){
2283
2321
  s[1] = c[1].style;
2284
- s[1].height = (this.h-4) + 'px';
2285
- s[1].lineHeight = (this.h-8) + 'px';
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';
2286
2326
  }
2287
2327
 
2288
2328
  let frag = Tools.frag;
@@ -2312,10 +2352,16 @@ class Proto {
2312
2352
  }
2313
2353
 
2314
2354
 
2355
+
2356
+
2357
+ }
2358
+
2359
+ addTransition(){
2360
+
2315
2361
  if( this.baseH && this.transition && this.isUI ){
2316
2362
  this.c[0].style.transition = 'height '+this.transition+'s ease-out';
2317
2363
  }
2318
-
2364
+
2319
2365
  }
2320
2366
 
2321
2367
  // from Tools
@@ -2438,7 +2484,7 @@ class Proto {
2438
2484
  if( this.isSend ) return;
2439
2485
  if( this.isEdit ) return;
2440
2486
 
2441
- this.setValue( this.objectLink[ this.val ] );
2487
+ this.setValue( this.objectLink[ this.objectKey ] );
2442
2488
 
2443
2489
  }
2444
2490
 
@@ -2504,8 +2550,8 @@ class Proto {
2504
2550
  if( v instanceof Array && v.length === 1 ) v = v[0];
2505
2551
 
2506
2552
  this.isSend = true;
2507
- if( this.objectLink !== null ) this.objectLink[ this.val ] = v;
2508
- if( this.callback ) this.callback( v, this.val );
2553
+ if( this.objectLink !== null ) this.objectLink[ this.objectKey ] = v;
2554
+ if( this.callback ) this.callback( v, this.objectKey );
2509
2555
  this.isSend = false;
2510
2556
 
2511
2557
  }
@@ -2516,7 +2562,7 @@ class Proto {
2516
2562
  if( v instanceof Array && v.length === 1 ) v = v[0];
2517
2563
 
2518
2564
  if( this.endCallback ) this.endCallback( v );
2519
- if( this.objectLink !== null ) this.objectLink[ this.val ] = v;
2565
+ if( this.objectLink !== null ) this.objectLink[ this.objectKey ] = v;
2520
2566
 
2521
2567
  }
2522
2568
 
@@ -2577,16 +2623,17 @@ class Proto {
2577
2623
  this.sb = this.w - this.sa;
2578
2624
  } else {
2579
2625
  let pp = this.w * ( this.p / 100 );
2580
- this.sa = Math.floor( pp + 10 );
2581
- 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 );
2582
2630
  }
2583
2631
 
2584
2632
  }
2585
2633
 
2586
2634
  rSize() {
2587
2635
 
2588
- if( !this.autoWidth ) return;
2589
-
2636
+ if( !this.autoWidth ) return
2590
2637
  if( !this.isUI ) this.s[0].width = this.w + 'px';
2591
2638
  if( !this.simple ) this.s[1].width = this.sa + 'px';
2592
2639
 
@@ -2663,10 +2710,10 @@ class Proto {
2663
2710
  // object referency
2664
2711
  // ----------------------
2665
2712
 
2666
- setReferency( obj, val ) {
2713
+ setReferency( obj, key ) {
2667
2714
 
2668
2715
  this.objectLink = obj;
2669
- this.val = val;
2716
+ this.objectKey = key;
2670
2717
 
2671
2718
  }
2672
2719
 
@@ -2680,8 +2727,9 @@ class Proto {
2680
2727
 
2681
2728
  open () {
2682
2729
 
2683
- if( this.isOpen ) return;
2730
+ if( this.isOpen ) return
2684
2731
  this.isOpen = true;
2732
+ Roots.needResize = true;
2685
2733
  if( this.openCallback ) this.openCallback();
2686
2734
 
2687
2735
  }
@@ -2690,6 +2738,7 @@ class Proto {
2690
2738
 
2691
2739
  if( !this.isOpen ) return
2692
2740
  this.isOpen = false;
2741
+ Roots.needResize = true;
2693
2742
  if( this.closeCallback ) this.closeCallback();
2694
2743
 
2695
2744
  }
@@ -2899,6 +2948,8 @@ class Button extends Proto {
2899
2948
  this.values = o.value || this.txt;
2900
2949
  if( o.values ) this.values = o.values;
2901
2950
 
2951
+ if( !o.values && !o.value ) this.txt = '';
2952
+
2902
2953
 
2903
2954
 
2904
2955
  this.onName = o.onName || null;
@@ -2938,10 +2989,10 @@ class Button extends Proto {
2938
2989
  if( !o.value && !o.values ){
2939
2990
  if( this.c[1] !== undefined ) {
2940
2991
  this.c[1].textContent = '';
2941
- this.txt = '';
2992
+ //this.txt = ''
2942
2993
  }
2943
2994
  }
2944
- if( !this.txt ) this.p = 0;
2995
+ if( this.txt==='' ) this.p = 0;
2945
2996
 
2946
2997
  this.init();
2947
2998
 
@@ -3106,17 +3157,20 @@ class Button extends Proto {
3106
3157
  let d = this.sa;
3107
3158
 
3108
3159
  let i = this.lng;
3109
- let dc = this.space;
3110
- 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 );
3111
3163
 
3112
3164
  if( this.bw ){
3113
3165
  size = this.bw < size ? this.bw : size;
3114
- 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);
3115
3168
  }
3116
3169
 
3117
3170
  while( i-- ){
3118
3171
 
3119
- 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 ];
3120
3174
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
3121
3175
 
3122
3176
  s[i+2].left = this.tmp[i][0] + 'px';
@@ -3829,13 +3883,15 @@ class Fps extends Proto {
3829
3883
  }
3830
3884
 
3831
3885
 
3832
- let fltop = Math.floor(this.h*0.5)-6;
3886
+ let fltop = Math.floor(this.h*0.5)-3;
3887
+ const ccc = this.colors;
3833
3888
 
3834
3889
  this.c[1].textContent = this.txt;
3890
+ //this.c[1].innerHTML = '&#160;' + this.txt
3835
3891
  this.c[0].style.cursor = 'pointer';
3836
3892
  this.c[0].style.pointerEvents = 'auto';
3837
3893
 
3838
- 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 +';';
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 +';';
3839
3895
 
3840
3896
  if( this.radius !== 0 ) panelCss += 'border-radius:' + this.radius+'px;';
3841
3897
 
@@ -3851,7 +3907,8 @@ class Fps extends Proto {
3851
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] );
3852
3908
 
3853
3909
  // arrow
3854
- 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'});
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'});
3855
3912
 
3856
3913
  // result test
3857
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;' );
@@ -3861,15 +3918,18 @@ class Fps extends Proto {
3861
3918
 
3862
3919
  this.isShow = false;
3863
3920
 
3921
+
3922
+
3864
3923
  let s = this.s;
3865
3924
 
3866
- s[1].marginLeft = '10px';
3925
+ //s[1].marginLeft = '10px';
3867
3926
  s[1].lineHeight = this.h-4;
3868
- s[1].color = this.colors.text;
3869
- s[1].fontWeight = 'bold';
3927
+ s[1].color = ccc.text;
3928
+ //s[1].paddingLeft = '18px';
3929
+ //s[1].fontWeight = 'bold';
3870
3930
 
3871
3931
  if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
3872
- if( this.colors.gborder!=='none') s[0].border = '1px solid ' + this.colors.gborder;
3932
+ if( this.colors.gborder!=='none') s[0].border = '1px solid ' + ccc.gborder;
3873
3933
 
3874
3934
 
3875
3935
 
@@ -3988,7 +4048,7 @@ class Fps extends Proto {
3988
4048
 
3989
4049
  this.h = this.hplus + this.baseH;
3990
4050
 
3991
- this.setSvg( this.c[3], 'd', this.svgs.arrowDown );
4051
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
3992
4052
 
3993
4053
  if( this.group !== null ){ this.group.calc( this.hplus );}
3994
4054
  else if( this.isUI ) this.main.calc( this.hplus );
@@ -4008,7 +4068,7 @@ class Fps extends Proto {
4008
4068
 
4009
4069
  this.h = this.baseH;
4010
4070
 
4011
- this.setSvg( this.c[3], 'd', this.svgs.arrow );
4071
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4012
4072
 
4013
4073
  if( this.group !== null ){ this.group.calc( -this.hplus );}
4014
4074
  else if( this.isUI ) this.main.calc( -this.hplus );
@@ -4079,6 +4139,8 @@ class Fps extends Proto {
4079
4139
  let s = this.s;
4080
4140
  let w = this.w;
4081
4141
 
4142
+ s[3].left = ( this.sa + this.sb - 6 ) + 'px';
4143
+
4082
4144
  s[0].width = w + 'px';
4083
4145
  s[1].width = w + 'px';
4084
4146
  s[2].left = 10 + 'px';
@@ -4413,46 +4475,96 @@ class Group extends Proto {
4413
4475
  this.current = -1;
4414
4476
  this.proto = null;
4415
4477
  this.isEmpty = true;
4416
- this.decal = 0;
4478
+
4479
+ this.decal = o.group ? 8 : 0;
4417
4480
 
4418
4481
  this.baseH = this.h;
4419
4482
 
4420
- let fltop = Math.floor(this.h*0.5)-6;
4483
+ let fltop = Math.floor(this.h*0.5)-3;
4421
4484
 
4422
- this.isLine = o.line !== undefined ? o.line : false;
4485
+ const cc = this.colors;
4423
4486
 
4424
- this.decal = 0;
4487
+ this.isLine = o.line !== undefined ? o.line : false;
4425
4488
 
4426
- if( o.group ){
4427
- this.decal = o.group.decal ? o.group.decal : 0;
4428
- this.decal += 6;
4429
- }
4489
+
4430
4490
 
4431
4491
  this.useFlex = true;
4432
4492
  let flexible = this.useFlex ? 'display:flex; flex-flow: row wrap;' : '';
4433
4493
 
4434
- this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+this.h+'px');//
4435
- 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'});
4436
- 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'});
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
+
4437
4502
  // bottom line
4438
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')
4439
4505
 
4440
4506
  let s = this.s;
4441
4507
  s[0].height = this.h + 'px';
4442
- s[1].height = this.h + 'px';
4443
4508
  this.c[1].name = 'group';
4444
4509
 
4445
- s[1].marginLeft = (10+this.decal)+'px';
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
+
4446
4524
  s[1].lineHeight = this.h-4;
4447
- s[1].color = this.colors.text;
4448
- s[1].fontWeight = 'bold';
4525
+ s[1].color = cc.text;
4526
+ //s[1].fontWeight = 'bold';
4527
+
4528
+
4529
+
4530
+
4449
4531
 
4450
- if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
4451
4532
  this.init();
4452
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
+
4453
4544
  this.setBG( o.bg );
4454
4545
 
4455
- if( o.open !== undefined ) this.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;
4456
4568
 
4457
4569
  }
4458
4570
 
@@ -4556,18 +4668,7 @@ class Group extends Proto {
4556
4668
 
4557
4669
  // ----------------------
4558
4670
 
4559
- setBG ( bg ) {
4560
-
4561
- if( bg !== undefined ) this.colors.background = bg;
4562
-
4563
- this.c[0].style.background = this.colors.background;
4564
-
4565
- let i = this.uis.length;
4566
- while(i--){
4567
- this.uis[i].setBG( this.colors.background );
4568
- }
4569
-
4570
- }
4671
+
4571
4672
 
4572
4673
  add() {
4573
4674
 
@@ -4666,11 +4767,29 @@ class Group extends Proto {
4666
4767
 
4667
4768
  super.open();
4668
4769
 
4669
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
4770
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
4771
+
4772
+ //this.setSvg( this.c[4], 'd', this.svgs.arrowDown )
4670
4773
  this.rSizeContent();
4671
4774
 
4672
4775
  this.h - this.baseH;
4673
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
+
4674
4793
  this.parentHeight();
4675
4794
 
4676
4795
  }
@@ -4681,9 +4800,14 @@ class Group extends Proto {
4681
4800
 
4682
4801
  this.h - this.baseH;
4683
4802
 
4684
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
4803
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4804
+
4805
+ //this.setSvg( this.c[4], 'd', this.svgs.arrow )
4685
4806
  this.h = this.baseH;
4686
- this.s[0].height = this.h + 'px';
4807
+
4808
+ const s = this.s;
4809
+ s[0].height = this.h + 'px';
4810
+ if(this.radius) s[1].borderRadius = this.radius+'px';
4687
4811
 
4688
4812
  this.parentHeight();
4689
4813
 
@@ -4730,9 +4854,20 @@ class Group extends Proto {
4730
4854
 
4731
4855
  let s = this.s;
4732
4856
 
4733
- s[3].left = ( this.sa + this.sb - 17 ) + 'px';
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
+
4734
4862
  s[1].width = this.w + 'px';
4735
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
+
4736
4871
 
4737
4872
  if( this.isOpen ) this.rSizeContent();
4738
4873
 
@@ -5276,14 +5411,12 @@ class List extends Proto {
5276
5411
  if( this.txt === '' ) this.p = 0;
5277
5412
 
5278
5413
 
5279
- let fltop = Math.floor(this.h*0.5)-5;
5414
+ let fltop = Math.floor(this.h*0.5)-3;
5280
5415
  let cc = this.colors;
5281
5416
 
5282
-
5283
-
5284
5417
  this.c[2] = this.dom( 'div', this.css.basic + 'top:0; display:none; border-radius:'+this.radius+'px;' );
5285
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;' );
5286
- 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'});
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'});
5287
5420
 
5288
5421
  this.scrollerBack = this.dom( 'div', this.css.basic + 'right:0px; width:'+ss+'px; background:'+cc.back+'; display:none;');
5289
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; ');
@@ -5343,8 +5476,6 @@ class List extends Proto {
5343
5476
  this.listIn = this.dom( 'div', this.css.basic + 'left:0; top:0; width:100%; background:none;');
5344
5477
  this.listIn.name = 'list';
5345
5478
 
5346
-
5347
-
5348
5479
  this.topList = 0;
5349
5480
 
5350
5481
  this.c[2].appendChild( this.listIn );
@@ -5383,12 +5514,10 @@ class List extends Proto {
5383
5514
 
5384
5515
  //this.c[0].style.background = '#FF0000'
5385
5516
  if( this.isWithImage ) this.preloadImage();
5386
- // } else {
5387
- // populate list
5388
- this.setList( this.list );
5389
- this.init();
5390
- if( this.isOpenOnStart ) this.open( true );
5391
- // }
5517
+
5518
+ this.setList( this.list );
5519
+ this.init();
5520
+ if( this.isOpenOnStart ) this.open( true );
5392
5521
 
5393
5522
  }
5394
5523
 
@@ -5948,9 +6077,9 @@ class List extends Proto {
5948
6077
 
5949
6078
  if( this.up ){
5950
6079
  this.zone.y -= this.h - (this.baseH-10);
5951
- this.setSvg( this.c[4], 'd', this.svgs.arrowUp );
6080
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5952
6081
  } else {
5953
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
6082
+ this.setSvg( this.c[4], 'd', this.svgs.g2 );
5954
6083
  }
5955
6084
 
5956
6085
  this.rSizeContent();
@@ -5974,7 +6103,7 @@ class List extends Proto {
5974
6103
  this.h = this.baseH;
5975
6104
  this.s[0].height = this.h + 'px';
5976
6105
  this.s[2].display = 'none';
5977
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
6106
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5978
6107
 
5979
6108
  this.zone.h = this.h;
5980
6109
 
@@ -6015,7 +6144,7 @@ class List extends Proto {
6015
6144
  s[3].width = w + 'px';
6016
6145
  s[3].left = d + 'px';
6017
6146
 
6018
- s[4].left = d + w - 17 + 'px';
6147
+ s[4].left = d + w - 15 + 'px';
6019
6148
 
6020
6149
  this.ww = w;
6021
6150
  if( this.max > this.maxHeight ) this.ww = w-this.ss;
@@ -6343,20 +6472,15 @@ class Numeric extends Proto {
6343
6472
 
6344
6473
  if( this.isVector ){
6345
6474
 
6346
- this.objectLink[ this.val ].fromArray( v );
6347
-
6348
- /*this.objectLink[ this.val ].x = v[0];
6349
- this.objectLink[ this.val ].y = v[1];
6350
- this.objectLink[ this.val ].z = v[2];
6351
- if( v[3] ) this.objectLink[ this.val ].w = v[3];*/
6475
+ this.objectLink[ this.objectKey ].fromArray( v );
6352
6476
 
6353
6477
  } else {
6354
- this.objectLink[ this.val ] = v;
6478
+ this.objectLink[ this.objectKey ] = v;
6355
6479
  }
6356
6480
 
6357
6481
  }
6358
6482
 
6359
- if( this.callback ) this.callback( v, this.val );
6483
+ if( this.callback ) this.callback( v, this.objectKey );
6360
6484
 
6361
6485
  this.isSend = false;
6362
6486
 
@@ -6425,12 +6549,15 @@ class Numeric extends Proto {
6425
6549
  rSize () {
6426
6550
 
6427
6551
  super.rSize();
6428
-
6429
- let w = Math.floor( ( this.sb + 5 ) / this.lng )-5;
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
6430
6555
  let s = this.s;
6431
6556
  let i = this.lng;
6557
+
6432
6558
  while(i--){
6433
- 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 ];
6434
6561
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
6435
6562
  s[ 3 + i ].left = this.tmp[i][0] + 'px';
6436
6563
  s[ 3 + i ].width = this.tmp[i][1] + 'px';
@@ -6481,25 +6608,27 @@ class Slide extends Proto {
6481
6608
 
6482
6609
  if(this.model !== 0){
6483
6610
 
6484
- let h1 = 4, h2 = 8, ww = this.h-4, ra = 20;
6611
+ let r1 = 4, h1 = 4, h2 = 8, ww = this.h-6, ra = 16;
6485
6612
 
6486
6613
  if( this.model === 2 ){
6487
- h1 = 4;//2
6488
- h2 = 8;
6614
+ r1 = 0;
6615
+ h1 = 2;
6616
+ h2 = 4;
6489
6617
  ra = 2;
6490
- ww = (this.h-4)*0.5;
6618
+ ww = (this.h-6)*0.5;
6491
6619
  }
6492
6620
 
6493
- if(this.model === 3) this.c[5].style.visible = 'none';
6621
+ if( this.model === 3 ) this.c[5].style.visible = 'none';
6494
6622
 
6495
- this.c[4].style.borderRadius = h1 + 'px';
6623
+ this.c[4].style.borderRadius = r1 + 'px';
6496
6624
  this.c[4].style.height = h2 + 'px';
6497
6625
  this.c[4].style.top = (this.h*0.5) - h1 + 'px';
6498
- this.c[5].style.borderRadius = (h1*0.5) + 'px';
6626
+ this.c[5].style.borderRadius = (r1*0.5) + 'px';
6499
6627
  this.c[5].style.height = h1 + 'px';
6500
6628
  this.c[5].style.top = (this.h*0.5)-(h1*0.5) + 'px';
6501
6629
 
6502
- 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;' );
6503
6632
  }
6504
6633
 
6505
6634
  this.init();
@@ -6642,23 +6771,15 @@ class Slide extends Proto {
6642
6771
  s[2].color = cc.text;
6643
6772
  s[4].background = cc.back;
6644
6773
  s[5].background = cc.text;
6774
+ if(this.model !== 0) s[6].background = cc.text;//cc.button;
6645
6775
  break;
6646
6776
  case 1: // scroll over
6647
6777
  //s[2].border = '1px dashed ' + this.colors.hide;
6648
6778
  s[2].color = cc.textOver;
6649
6779
  s[4].background = cc.back;
6650
6780
  s[5].background = cc.textOver;
6781
+ if(this.model !== 0) s[6].background = cc.textOver;//cc.overoff;
6651
6782
  break;
6652
- /* case 2:
6653
- s[2].border = '1px solid ' + this.colors.borderSelect;
6654
- break;
6655
- case 3:
6656
- s[2].border = '1px dashed ' + this.colors.text;//this.colors.borderSelect;
6657
- break;
6658
- case 4:
6659
- s[2].border = '1px dashed ' + this.colors.hide;
6660
- break;*/
6661
-
6662
6783
 
6663
6784
  }
6664
6785
  }
@@ -6713,7 +6834,7 @@ class TextInput extends Proto {
6713
6834
 
6714
6835
  this.cmode = 0;
6715
6836
 
6716
- this.value = o.value || '';
6837
+ this.value = o.value !== undefined ? o.value : '';
6717
6838
  this.placeHolder = o.placeHolder || '';
6718
6839
 
6719
6840
  this.allway = o.allway || false;
@@ -6956,16 +7077,17 @@ class Select extends Proto {
6956
7077
 
6957
7078
  this.onActif = o.onActif || function(){};
6958
7079
 
6959
- o.prefix || '';
7080
+ //let prefix = o.prefix || '';
7081
+ const cc = this.colors;
6960
7082
 
6961
- this.c[2] = this.dom( 'div', this.css.txt + this.css.button + ' top:1px; background:'+this.colors.button+'; height:'+(this.h-2)+'px; border:'+this.colors.buttonBorder+'; border-radius:15px; width:30px; left:10px;' );
6962
- this.c[2].style.color = this.fontColor;
7083
+ this.c[2] = this.dom( 'div', this.css.txt + this.css.button + ' top:1px; background:'+cc.button+'; height:'+(this.h-2)+'px; border:'+ cc.buttonBorder+'; border-radius:15px; width:30px; left:10px;' );
7084
+ //this.c[2].style.color = this.fontColor;
6963
7085
 
6964
- this.c[3] = this.dom( 'div', this.css.txtselect + 'height:' + (this.h-4) + 'px; background:' + this.colors.inputBg + '; borderColor:' + this.colors.inputBorder+'; border-radius:'+this.radius+'px;' );
7086
+ this.c[3] = this.dom( 'div', this.css.txtselect + 'height:' + (this.h-4) + 'px; background:' + cc.inputBg + '; borderColor:' + cc.inputBorder+'; border-radius:'+this.radius+'px;' );
6965
7087
  this.c[3].textContent = this.value;
6966
7088
 
6967
7089
  let fltop = Math.floor(this.h*0.5)-7;
6968
- this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:14px; height:14px; left:5px; top:'+fltop+'px;', { d:this.svgs[ 'cursor' ], fill:this.fontColor, stroke:'none'});
7090
+ this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:14px; height:14px; left:5px; top:'+fltop+'px;', { d:this.svgs[ 'cursor' ], fill:cc.text, stroke:'none'});
6969
7091
 
6970
7092
  this.stat = 1;
6971
7093
  this.isActif = false;
@@ -7077,8 +7199,8 @@ class Select extends Proto {
7077
7199
  switch( n ){
7078
7200
 
7079
7201
  case 1: this.s[ 2 ].color = cc.text; this.s[ 2 ].background = cc.button; break; // base
7080
- case 2: this.s[ 2 ].color = cc.textOver; this.s[ 2 ].background = cc.over; break; // over
7081
- case 3: this.s[ 2 ].color = cc.textSelect; this.s[ 2 ].background = cc.select; break; // down
7202
+ case 2: this.s[ 2 ].color = cc.textOver; this.s[ 2 ].background = cc.overoff; break; // over
7203
+ case 3: this.s[ 2 ].color = cc.textOver; this.s[ 2 ].background = cc.action; break; // down
7082
7204
  case 4: this.s[ 2 ].color = cc.textSelect; this.s[ 2 ].background = cc.action; break; // actif
7083
7205
 
7084
7206
  }
@@ -7091,6 +7213,209 @@ class Select extends Proto {
7091
7213
 
7092
7214
 
7093
7215
 
7216
+ }
7217
+
7218
+ reset () {
7219
+
7220
+ this.cursor();
7221
+ return this.mode( this.isActif ? 4 : 1 );
7222
+
7223
+ }
7224
+
7225
+ text ( txt ) {
7226
+
7227
+ this.c[3].textContent = txt;
7228
+
7229
+ }
7230
+
7231
+ rSize () {
7232
+
7233
+ super.rSize();
7234
+
7235
+ let s = this.s;
7236
+ s[2].left = this.sa + 'px';
7237
+ s[3].left = (this.sa + 40) + 'px';
7238
+ s[3].width = (this.sb - 40) + 'px';
7239
+ s[4].left = (this.sa+8) + 'px';
7240
+
7241
+ }
7242
+
7243
+ }
7244
+
7245
+ class Bitmap extends Proto {
7246
+
7247
+ constructor( o = {} ) {
7248
+
7249
+ super( o );
7250
+
7251
+ this.value = o.value || '';
7252
+ this.refTexture = o.texture || null;
7253
+ this.img = null;
7254
+
7255
+ this.isDown = false;
7256
+ this.neverlock = true;
7257
+
7258
+
7259
+
7260
+ const cc = this.colors;
7261
+
7262
+ this.c[2] = this.dom( 'div', this.css.txt + this.css.button + ' top:1px; background:'+cc.button+'; height:'+(this.h-2)+'px; border:'+cc.buttonBorder+'; border-radius:15px; width:30px; left:10px;' );
7263
+
7264
+ this.c[3] = this.dom( 'div', this.css.txtselect + 'height:' + (this.h-4) + 'px; background:' + cc.inputBg + '; borderColor:' + cc.inputBorder+'; border-radius:'+this.radius+'px;' );
7265
+ this.c[3].textContent = this.value;
7266
+
7267
+ let fltop = Math.floor(this.h*0.5)-7;
7268
+ this.c[4] = this.dom( 'path', this.css.basic + 'position:absolute; width:14px; height:14px; left:5px; top:'+fltop+'px;', { d:this.svgs[ 'load' ], fill:cc.text, stroke:'none'});
7269
+
7270
+ this.stat = 1;
7271
+
7272
+ this.init();
7273
+
7274
+ }
7275
+
7276
+ testZone ( e ) {
7277
+
7278
+ let l = this.local;
7279
+ if( l.x === -1 && l.y === -1 ) return '';
7280
+ if( l.x > this.sa && l.x < this.sa+30 ) return 'over';
7281
+ return '0'
7282
+
7283
+ }
7284
+
7285
+ // ----------------------
7286
+ // EVENTS
7287
+ // ----------------------
7288
+
7289
+ mouseup ( e ) {
7290
+
7291
+ if( this.isDown ){
7292
+ //this.value = false;
7293
+ this.isDown = false;
7294
+ //this.send();
7295
+ return this.mousemove( e );
7296
+ }
7297
+
7298
+ return false;
7299
+
7300
+ }
7301
+
7302
+ mousedown ( e ) {
7303
+
7304
+ let name = this.testZone( e );
7305
+
7306
+ if( !name ) return false;
7307
+
7308
+ if( name === 'over' ){
7309
+ this.isDown = true;
7310
+ Files.load( { callback:this.changeBitmap.bind(this) } );
7311
+
7312
+ }
7313
+
7314
+
7315
+ //this.value = this.values[ name-2 ];
7316
+ //this.send();
7317
+ return this.mousemove( e );
7318
+
7319
+ }
7320
+
7321
+ mousemove ( e ) {
7322
+
7323
+ let up = false;
7324
+
7325
+ let name = this.testZone( e );
7326
+ //let sel = false;
7327
+
7328
+
7329
+
7330
+ //console.log(name)
7331
+
7332
+ if( name === 'over' ){
7333
+ this.cursor('pointer');
7334
+ up = this.mode( this.isDown ? 3 : 2 );
7335
+ } else {
7336
+ up = this.reset();
7337
+ }
7338
+
7339
+ return up;
7340
+
7341
+ }
7342
+
7343
+ // ----------------------
7344
+
7345
+ changeBitmap( img, fname ){
7346
+
7347
+ if( img ){
7348
+ this.img = img;
7349
+ this.apply( fname );
7350
+ } else {
7351
+ this.img = null;
7352
+ this.apply( 'null' );
7353
+ }
7354
+
7355
+ }
7356
+
7357
+ // ----------------------
7358
+
7359
+ apply ( v ) {
7360
+
7361
+ v = v || '';
7362
+
7363
+ if( v !== this.value ) {
7364
+ this.value = v;
7365
+ this.c[3].textContent = this.value;
7366
+
7367
+ if( this.img !== null ){
7368
+ if( this.objectLink !== null ) this.objectLink[ this.val ] = v;
7369
+ if( this.callback ) this.callback( v, this.img, this.name );
7370
+ }
7371
+
7372
+ }
7373
+
7374
+ this.mode(1);
7375
+
7376
+ }
7377
+
7378
+ update () {
7379
+
7380
+ this.mode( 3 );
7381
+
7382
+ }
7383
+
7384
+ mode ( n ) {
7385
+
7386
+ let change = false;
7387
+ let cc = this.colors;
7388
+
7389
+ if( this.stat !== n ){
7390
+
7391
+ /*if( n===1 ) this.isActif = false
7392
+
7393
+ if( n===3 ){
7394
+ if( !this.isActif ){ this.isActif = true; n=4; this.onActif( this ); }
7395
+ else { this.isActif = false; }
7396
+ }
7397
+
7398
+ if( n===2 && this.isActif ) n = 4;*/
7399
+
7400
+ this.stat = n;
7401
+
7402
+ switch( n ){
7403
+
7404
+ case 1: this.s[ 2 ].color = cc.text; this.s[ 2 ].background = cc.button; break; // base
7405
+ case 2: this.s[ 2 ].color = cc.textOver; this.s[ 2 ].background = cc.overoff; break; // over
7406
+ case 3: this.s[ 2 ].color = cc.textOver; this.s[ 2 ].background = cc.over; break; // down
7407
+ case 4: this.s[ 2 ].color = cc.textSelect; this.s[ 2 ].background = cc.select; break; // actif
7408
+
7409
+ }
7410
+
7411
+ change = true;
7412
+
7413
+ }
7414
+
7415
+ return change;
7416
+
7417
+
7418
+
7094
7419
  }
7095
7420
 
7096
7421
  reset () {
@@ -7878,6 +8203,7 @@ const add = function () {
7878
8203
  case 'textInput': case 'string': n = new TextInput(o); break;
7879
8204
  case 'title': case 'text': n = new Title(o); break;
7880
8205
  case 'select': n = new Select(o); break;
8206
+ case 'bitmap': n = new Bitmap(o); break;
7881
8207
  case 'selector': n = new Selector(o); break;
7882
8208
  case 'empty': case 'space': n = new Empty(o); break;
7883
8209
  case 'item': n = new Item(o); break;
@@ -7886,8 +8212,12 @@ const add = function () {
7886
8212
 
7887
8213
  }
7888
8214
 
8215
+
8216
+
7889
8217
  if( n !== null ){
7890
8218
 
8219
+ Roots.needResize = true;
8220
+
7891
8221
  if( ref ) n.setReferency( a[0], a[1] );
7892
8222
  return n;
7893
8223
 
@@ -7947,7 +8277,6 @@ class Gui {
7947
8277
 
7948
8278
  // color
7949
8279
  if( o.config ) o.colors = o.config;
7950
-
7951
8280
  if ( o.colors ) this.setConfig( o.colors );
7952
8281
  else this.colors = Tools.defineColor( o );
7953
8282
 
@@ -8071,7 +8400,7 @@ class Gui {
8071
8400
 
8072
8401
  // height transition
8073
8402
  this.transition = o.transition || Tools.transition;
8074
- if( this.transition ) setTimeout( this.addTransition.bind( this ), 0 );
8403
+ if( this.transition ) setTimeout( this.addTransition.bind( this ), 1000 );
8075
8404
 
8076
8405
 
8077
8406
  this.setWidth();
@@ -8101,6 +8430,9 @@ class Gui {
8101
8430
  //this.bottom.addEventListener("transitionend", Roots.resize, true);
8102
8431
  }
8103
8432
 
8433
+ let i = this.uis.length;
8434
+ while( i-- ) this.uis[i].addTransition();
8435
+
8104
8436
  }
8105
8437
 
8106
8438
  // ----------------------
@@ -8683,6 +9015,6 @@ class Gui {
8683
9015
 
8684
9016
  }
8685
9017
 
8686
- const REVISION = '4.1.0';
9018
+ const REVISION = '4.2.2';
8687
9019
 
8688
9020
  export { Files, Gui, Proto, REVISION, Tools, add };