uil 4.2.1 → 4.2.5

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.
@@ -250,7 +250,7 @@ const R = {
250
250
  e.type = 'mouseup';
251
251
  }
252
252
 
253
- if( event.type === 'pointerleave'){ R.isLeave = true; }
253
+ if( event.type === 'pointerleave') R.isLeave = true;
254
254
 
255
255
  if( event.type === 'pointerdown') e.type = 'mousedown';
256
256
  if( event.type === 'pointerup') e.type = 'mouseup';
@@ -301,6 +301,8 @@ const R = {
301
301
 
302
302
  }
303
303
 
304
+ //if( R.ID.marginDiv ) e.clientY -= R.ID.margin * 0.5
305
+
304
306
  R.ID.handleEvent( e );
305
307
 
306
308
  }
@@ -367,13 +369,13 @@ const R = {
367
369
  // GUI / GROUP FUNCTION
368
370
  // ----------------------
369
371
 
370
- calcUis: function ( uis, zone, py ) {
372
+ calcUis: ( uis, zone, py ) => {
371
373
 
372
374
  //console.log('calc_uis')
373
375
 
374
- let i = uis.length, u, px = 0, n = 0, tw;
376
+ let i = uis.length, u, px = 0, n = 0, tw, m;
377
+
375
378
  let height = 0;
376
- let m = 1;
377
379
 
378
380
  while( i-- ){
379
381
 
@@ -382,33 +384,30 @@ const R = {
382
384
 
383
385
  if( u.isGroup ) u.calcUis();
384
386
 
385
- u.zone.w = u.w;
386
- u.zone.h = u.h;
387
387
  m = u.margin;
388
+ //div = u.marginDiv
388
389
 
390
+ u.zone.w = u.w;
391
+ u.zone.h = u.h + m;
392
+
389
393
  if( !u.autoWidth ){
390
394
 
391
- if( px===0 ){
392
- height += u.h + m;
393
-
394
- }
395
+ if( px === 0 ) height += u.h + m;
395
396
 
396
397
  u.zone.x = zone.x + px;
397
- u.zone.y = py;
398
+ u.zone.y = py;// + u.mtop
399
+ //if(div) u.zone.y += m * 0.5
398
400
 
399
401
  tw = R.getWidth(u);
400
402
  if( tw ) u.zone.w = u.w = tw;
401
- // focrce width if content is canvas
402
403
  else if( u.fw ) u.zone.w = u.w = u.fw;
403
404
 
404
-
405
- //console.log( u.name, u.zone.w, u.w, zone, tw )
406
- //console.log( tw )
407
405
  px += u.zone.w;
408
406
 
409
407
  if( px >= zone.w ) {
410
- py += u.h + m;
411
- px = 0;
408
+ py += u.h + m;
409
+ //if(div) py += m * 0.5
410
+ px = 0;
412
411
  }
413
412
 
414
413
  } else {
@@ -419,6 +418,7 @@ const R = {
419
418
  u.zone.y = py;
420
419
  py += u.h + m;
421
420
 
421
+
422
422
  height += u.h + m;
423
423
 
424
424
  }
@@ -472,8 +472,13 @@ const R = {
472
472
  let mx = x - z.x;
473
473
  let my = y - z.y;
474
474
 
475
+ //if( this.marginDiv ) e.clientY -= this.margin * 0.5
476
+ //if( o.group && o.group.marginDiv ) my += o.group.margin * 0.5
477
+
475
478
  let over = ( mx >= 0 ) && ( my >= 0 ) && ( mx <= z.w ) && ( my <= z.h );
476
479
 
480
+ //if( o.marginDiv ) my -= o.margin * 0.5
481
+
477
482
  if( over ) o.local.set( mx, my );
478
483
  else o.local.neg();
479
484
 
@@ -910,7 +915,7 @@ const T = {
910
915
  torad: Math.PI / 180,
911
916
  todeg: 180 / Math.PI,
912
917
 
913
- clamp: function (v, min, max) {
918
+ clamp: ( v, min, max ) => {
914
919
 
915
920
  v = v < min ? min : v;
916
921
  v = v > max ? max : v;
@@ -918,13 +923,15 @@ const T = {
918
923
 
919
924
  },
920
925
 
926
+ isDivid: ( v ) => ( v*0.5 === Math.floor(v*0.5) ),
927
+
921
928
  size: { w: 240, h: 20, p: 30, s: 8 },
922
929
 
923
930
  // ----------------------
924
931
  // COLOR
925
932
  // ----------------------
926
933
 
927
- defineColor: function( o, cc = T.colors ) {
934
+ defineColor: ( o, cc = T.colors ) => {
928
935
 
929
936
  let color = { ...cc };
930
937
 
@@ -969,8 +976,8 @@ const T = {
969
976
  if( o.fontSelect ) color.textSelect = o.fontSelect;
970
977
  if( o.groupBorder ) color.gborder = o.groupBorder;
971
978
 
972
- if( o.transparent ) o.bg = 'none';
973
- if( o.bg ) color.background = color.backgroundOver = o.bg;
979
+ //if( o.transparent ) o.bg = 'none'
980
+ //if( o.bg ) color.background = color.backgroundOver = o.bg
974
981
  if( o.bgOver ) color.backgroundOver = o.bgOver;
975
982
 
976
983
  for( let m in color ){
@@ -989,9 +996,13 @@ const T = {
989
996
 
990
997
  colors: {
991
998
 
999
+ sx: 4,//4
1000
+ sy: 2,//2
1001
+ radius:2,
1002
+
992
1003
  content:'none',
993
- background: 'rgba(50,50,50,0.3)',
994
- backgroundOver: 'rgba(50,50,50,0.4)',
1004
+ background: 'rgba(50,50,50,0.15)',
1005
+ backgroundOver: 'rgba(50,50,50,0.3)',
995
1006
 
996
1007
  title : '#CCC',
997
1008
  titleoff : '#BBB',
@@ -999,17 +1010,15 @@ const T = {
999
1010
  textOver : '#EEE',
1000
1011
  textSelect : '#FFF',
1001
1012
 
1002
- //inputBg: 'rgba(0,0,0,0.25)',
1003
- //itemBg:'rgba(0,0,0,0.25)',
1004
-
1005
1013
  back:'rgba(0,0,0,0.2)',
1006
1014
  backoff:'rgba(0,0,0,0.3)',
1007
- //inputOver: 'rgba(0,0,0,0.2)',
1008
1015
 
1009
1016
  // input and button border
1010
1017
  border : '#4c4c4c',
1011
1018
  borderSize : 1,
1019
+
1012
1020
  gborder : 'none',
1021
+ groups : 'none',
1013
1022
 
1014
1023
  button : '#3c3c3c',
1015
1024
  overoff : '#5c5c5c',
@@ -1017,15 +1026,14 @@ const T = {
1017
1026
  select : '#308AFF',
1018
1027
  action: '#FF3300',
1019
1028
 
1020
-
1021
1029
  //fontFamily: 'Tahoma',
1022
- fontFamily: 'Consolas, monaco, monospace',
1030
+ fontFamily: 'Consolas, monospace',
1023
1031
  //fontFamily: "'Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace",
1024
1032
  fontWeight: 'normal',
1025
1033
  fontShadow: 'none',//'#000',
1026
1034
  fontSize:12,
1027
1035
 
1028
- radius:2,
1036
+
1029
1037
  hide: 'rgba(0,0,0,0)',
1030
1038
 
1031
1039
  },
@@ -1034,21 +1042,21 @@ const T = {
1034
1042
 
1035
1043
  css : {
1036
1044
 
1037
- //unselect: '-o-user-select:none; -ms-user-select:none; -khtml-user-select:none; -webkit-user-select:none; -moz-user-select:none;',
1038
1045
  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;',*/
1046
+ button:'display:flex; align-items:center; justify-content:center; text-align:center;',
1047
+ middle:'display:flex; align-items:center; justify-content:left; text-align:left; flex-direction: row-reverse;'
1044
1048
  },
1045
1049
 
1046
1050
  // svg path
1047
1051
 
1048
1052
  svgs: {
1049
1053
 
1054
+ 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',
1055
+ 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',
1056
+
1050
1057
  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
1058
  arrow:'M 3 8 L 8 5 3 2 3 8 Z',
1059
+
1052
1060
  arrowDown:'M 5 8 L 8 3 2 3 5 8 Z',
1053
1061
  arrowUp:'M 5 2 L 2 7 8 7 5 2 Z',
1054
1062
 
@@ -1067,7 +1075,9 @@ const T = {
1067
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',
1068
1076
  none:'M 9 5 L 5 5 5 9 9 9 9 5 Z',
1069
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',
1070
- 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',
1078
+ load:'M 13 8 L 11.5 6.5 9 9 9 3 5 3 5 9 2.5 6.5 1 8 7 14 13 8 M 9 2 L 9 0 5 0 5 2 9 2 Z',
1079
+ save:'M 9 12 L 5 12 5 14 9 14 9 12 M 11.5 7.5 L 13 6 7 0 1 6 2.5 7.5 5 5 5 11 9 11 9 5 11.5 7.5 Z',
1080
+ extern:'M 14 14 L 14 0 0 0 0 14 14 14 M 12 6 L 12 12 2 12 2 6 12 6 M 12 2 L 12 4 2 4 2 2 12 2 Z',
1071
1081
 
1072
1082
  },
1073
1083
 
@@ -1115,16 +1125,13 @@ const T = {
1115
1125
  else size += 'px';
1116
1126
 
1117
1127
 
1118
- let align = 'display:flex; justify-content:left; align-items:center; text-align:left;';
1128
+ //let align = 'display:flex; justify-content:left; align-items:center; text-align:left;'
1119
1129
 
1120
- T.css.txt = T.css.basic + align + ' font-family:'+ font +'; font-weight:'+weight+'; font-size:'+size+'; color:'+cc.text+'; padding:0px 10px; left:0; top:2px; height:16px; width:100px; overflow:hidden; white-space: nowrap; letter-spacing: normal;';
1130
+ 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;';
1121
1131
  if( shadow !== 'none' ) T.css.txt += ' text-shadow: 1px 1px 1px '+shadow+';';
1122
1132
 
1123
1133
  T.css.txtselect = T.css.txt + 'padding:0px 4px; border:1px dashed ' + cc.border + ';';
1124
- //T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; '//display:block; padding:4px 4px;';//
1125
- T.css.item = T.css.txt + ' position:relative; margin-bottom:1px; display:block; padding:2px 4px;';//
1126
-
1127
- //console.log( T.css.txt )
1134
+ T.css.item = T.css.txt + 'padding:0px 4px; position:relative; margin-bottom:1px; ';
1128
1135
 
1129
1136
  },
1130
1137
 
@@ -1315,6 +1322,8 @@ const T = {
1315
1322
 
1316
1323
  ColorLuma : function ( hex, l ) {
1317
1324
 
1325
+ //if( hex.substring(0, 3) === 'rgba' ) hex = '#000';
1326
+
1318
1327
  if( hex === 'n' ) hex = '#000';
1319
1328
 
1320
1329
  // validate hex string
@@ -1748,11 +1757,26 @@ class Files {
1748
1757
  case 'svg':
1749
1758
  t = [ { accept: { 'image/svg+xml': '.svg'} }, ];
1750
1759
  break;
1760
+ case 'wav':
1761
+ t = [ { accept: { 'audio/wav': '.wav'} }, ];
1762
+ break;
1763
+ case 'mp3':
1764
+ t = [ { accept: { 'audio/mpeg': '.mp3'} }, ];
1765
+ break;
1766
+ case 'mp4':
1767
+ t = [ { accept: { 'video/mp4': '.mp4'} }, ];
1768
+ break;
1769
+ case 'bin':case 'hex':
1770
+ t = [ { description: 'Binary Files', accept: { 'application/octet-stream': ['.bin', '.hex'] } }, ];
1771
+ break;
1751
1772
  case 'text':
1752
1773
  t = [ { description: 'Text Files', accept: { 'text/plain': ['.txt', '.text'], 'text/html': ['.html', '.htm'] } }, ];
1753
1774
  break;
1754
1775
  case 'json':
1755
- t = [ { description: 'JSON Files', accept: { 'text/plain': ['.json'] } }, ];
1776
+ t = [ { description: 'JSON Files', accept: { 'application/json': ['.json'] } }, ];//text/plain
1777
+ break;
1778
+ case 'js':
1779
+ t = [ { description: 'JavaScript Files', accept: { 'text/javascript': ['.js'] } }, ];
1756
1780
  break;
1757
1781
  case 'image':
1758
1782
  t = [ { description: 'Images', accept: { 'image/*': ['.png', '.gif', '.jpeg', '.jpg'] } }, ];
@@ -2128,6 +2152,9 @@ class Proto {
2128
2152
 
2129
2153
  this.isListen = false;
2130
2154
 
2155
+ this.top = 0;
2156
+ this.ytop = 0;
2157
+
2131
2158
  this.isSelectable = o.selectable !== undefined ? o.selectable : false;
2132
2159
  this.unselectable = o.unselect !== undefined ? o.unselect : this.isSelectable;
2133
2160
 
@@ -2139,7 +2166,7 @@ class Proto {
2139
2166
 
2140
2167
  this.svgs = Tools.svgs;
2141
2168
 
2142
- this.zone = { x:0, y:0, w:0, h:0 };
2169
+ this.zone = { x:0, y:0, w:0, h:0, d:0 };
2143
2170
  this.local = new V2().neg();
2144
2171
 
2145
2172
  this.isCanvasOnly = false;
@@ -2161,7 +2188,7 @@ class Proto {
2161
2188
  this.fw = o.fw || 0;
2162
2189
 
2163
2190
  this.autoWidth = o.auto || true;// auto width or flex
2164
- this.isOpen = false;// open statu
2191
+ this.isOpen = false;//false// open statu
2165
2192
 
2166
2193
  // radius for toolbox
2167
2194
  this.radius = o.radius || this.colors.radius;
@@ -2231,22 +2258,26 @@ class Proto {
2231
2258
  this.s[0] = this.c[0].style;
2232
2259
 
2233
2260
  // bottom margin
2234
- this.margin = o.margin || 1;
2261
+ this.margin = this.colors.sy;
2262
+ this.mtop = 0;
2263
+ let marginDiv = Tools.isDivid( this.margin );
2264
+
2235
2265
  if( this.isUI && this.margin ){
2236
2266
  this.s[0].boxSizing = 'content-box';
2237
- //this.s[0].marginBottom = this.margin + 'px';
2238
- if( this.margin*0.5===Math.floor(this.margin*0.5) ){
2239
- this.s[0].borderTop = (this.margin*0.5) + 'px solid transparent';
2240
- this.s[0].borderBottom = (this.margin*0.5) + 'px solid transparent';
2267
+ if( marginDiv ){
2268
+ this.mtop = this.margin * 0.5;
2269
+ //this.s[0].borderTop = '${this.mtop}px solid transparent'
2270
+ //console.log(`${this.mtop}px solid transparent`)
2271
+ this.s[0].borderTop = this.mtop + 'px solid transparent';
2272
+ this.s[0].borderBottom = this.mtop + 'px solid transparent';
2241
2273
  } else {
2242
2274
  this.s[0].borderBottom = this.margin + 'px solid transparent';
2243
2275
  }
2244
-
2245
2276
  }
2246
2277
 
2247
2278
  // with title
2248
2279
  if( !this.simple ){
2249
- this.c[1] = Tools.dom( 'div', this.css.txt );
2280
+ this.c[1] = Tools.dom( 'div', this.css.txt + this.css.middle );
2250
2281
  this.s[1] = this.c[1].style;
2251
2282
  this.c[1].textContent = this.name;
2252
2283
  this.s[1].color = this.lock ? this.colors.titleoff : this.colors.title;
@@ -2274,7 +2305,9 @@ class Proto {
2274
2305
 
2275
2306
  init() {
2276
2307
 
2277
- this.zone.h = this.h;
2308
+ this.ytop = this.top + this.mtop;
2309
+
2310
+ this.zone.h = this.h + this.margin;
2278
2311
  this.zone.w = this.w;
2279
2312
 
2280
2313
  let s = this.s; // style cache
@@ -2295,8 +2328,8 @@ class Proto {
2295
2328
  //if( this.autoHeight ) s[0].transition = 'height 0.01s ease-out';
2296
2329
  if( c[1] !== undefined && this.autoWidth ){
2297
2330
  s[1] = c[1].style;
2298
- s[1].height = (this.h-4) + 'px';
2299
- s[1].lineHeight = (this.h-8) + 'px';
2331
+ s[1].top = 1 + 'px';
2332
+ s[1].height = (this.h-2) + 'px';
2300
2333
  }
2301
2334
 
2302
2335
  let frag = Tools.frag;
@@ -2426,7 +2459,6 @@ class Proto {
2426
2459
  uiout() {
2427
2460
 
2428
2461
  if( this.lock ) return;
2429
-
2430
2462
  if(this.s) this.s[0].background = this.colors.background;
2431
2463
 
2432
2464
  }
@@ -2434,7 +2466,6 @@ class Proto {
2434
2466
  uiover() {
2435
2467
 
2436
2468
  if( this.lock ) return;
2437
-
2438
2469
  if(this.s) this.s[0].background = this.colors.backgroundOver;
2439
2470
 
2440
2471
  }
@@ -2597,8 +2628,10 @@ class Proto {
2597
2628
  this.sb = this.w - this.sa;
2598
2629
  } else {
2599
2630
  let pp = this.w * ( this.p / 100 );
2600
- this.sa = Math.floor( pp + 10 );
2601
- this.sb = Math.floor( this.w - pp - 20 );
2631
+ //this.sa = Math.floor( pp + 10 )
2632
+ //this.sb = Math.floor( this.w - pp - 20 )
2633
+ this.sa = Math.floor( pp + 8 );
2634
+ this.sb = Math.floor( this.w - pp - 16 );
2602
2635
  }
2603
2636
 
2604
2637
  }
@@ -2638,6 +2671,7 @@ class Proto {
2638
2671
  case 3: s = 0.001; break;
2639
2672
  case 4: s = 0.0001; break;
2640
2673
  case 5: s = 0.00001; break;
2674
+ case 6: s = 0.000001; break;
2641
2675
  }
2642
2676
 
2643
2677
  this.step = o.step === undefined ? s : o.step;
@@ -2649,7 +2683,7 @@ class Proto {
2649
2683
  numValue( n ) {
2650
2684
 
2651
2685
  if( this.noNeg ) n = Math.abs( n );
2652
- return Math.min( this.max, Math.max( this.min, n ) ).toFixed( this.precision ) * 1;
2686
+ return Math.min( this.max, Math.max( this.min, n ) ).toFixed( this.precision ) * 1
2653
2687
 
2654
2688
  }
2655
2689
 
@@ -2661,11 +2695,17 @@ class Proto {
2661
2695
  handleEvent( e ) {
2662
2696
 
2663
2697
  if( this.lock ) return
2664
-
2665
2698
  if( this.neverlock ) Roots.lock = false;
2666
-
2667
2699
  if( !this[e.type] ) return console.error(e.type, 'this type of event no existe !')
2668
2700
 
2701
+
2702
+ // TODO !!!!
2703
+
2704
+ //if( this.marginDiv ) z.d -= this.margin * 0.5
2705
+
2706
+ //if( this.marginDiv ) e.clientY -= this.margin * 0.5
2707
+ //if( this.group && this.group.marginDiv ) e.clientY -= this.group.margin * 0.5
2708
+
2669
2709
  return this[e.type](e)
2670
2710
 
2671
2711
  }
@@ -2788,7 +2828,7 @@ class Bool extends Proto {
2788
2828
  } else {
2789
2829
  this.p = 0;
2790
2830
  if( this.c[1] !== undefined ) this.c[1].textContent = '';
2791
- this.c[2] = this.dom( 'div', this.css.txt + this.css.button + 'top:1px; background:'+cc.button+'; height:'+(this.h-2)+'px; border:1px solid '+cc.border+'; border-radius:'+this.radius+'px;' );
2831
+ this.c[2] = this.dom( 'div', this.css.txt + this.css.button + 'top:1px; background:'+cc.button+'; height:'+(this.h-2)+'px; border:'+cc.borderSize+'px solid '+cc.border+'; border-radius:'+this.radius+'px;' );
2792
2832
  }
2793
2833
 
2794
2834
  this.stat = -1;
@@ -2902,7 +2942,7 @@ class Bool extends Proto {
2902
2942
  s[3].left = w + 'px';
2903
2943
  } else {
2904
2944
  s[2].left = this.sa + 'px';
2905
- s[2].width = (this.w- 20) + 'px';
2945
+ s[2].width = this.sb + 'px';
2906
2946
  }
2907
2947
 
2908
2948
  }
@@ -2920,6 +2960,8 @@ class Button extends Proto {
2920
2960
  this.values = o.value || this.txt;
2921
2961
  if( o.values ) this.values = o.values;
2922
2962
 
2963
+ if( !o.values && !o.value ) this.txt = '';
2964
+
2923
2965
 
2924
2966
 
2925
2967
  this.onName = o.onName || null;
@@ -2956,13 +2998,13 @@ class Button extends Proto {
2956
2998
 
2957
2999
  }
2958
3000
 
2959
- if( !o.value && !o.values ){
2960
- if( this.c[1] !== undefined ) {
2961
- this.c[1].textContent = '';
2962
- //this.txt = ''
2963
- }
3001
+
3002
+ if( this.txt==='' ) this.p = 0;
3003
+
3004
+ if( (!o.value && !o.values) || this.p === 0 ){
3005
+ if( this.c[1] !== undefined ) this.c[1].textContent = '';
2964
3006
  }
2965
- if( !this.txt ) this.p = 0;
3007
+
2966
3008
 
2967
3009
  this.init();
2968
3010
 
@@ -2971,7 +3013,7 @@ class Button extends Proto {
2971
3013
  onOff() {
2972
3014
 
2973
3015
  this.on = !this.on;
2974
- this.label( this.on ? this.onName : this.txt );
3016
+ this.label( this.on ? this.onName : this.value );
2975
3017
 
2976
3018
  }
2977
3019
 
@@ -3076,10 +3118,10 @@ class Button extends Proto {
3076
3118
 
3077
3119
  switch( n ){
3078
3120
 
3079
- case 1: s[i].color = cc.text; s[i].background = cc.button; break;
3080
- case 2: s[i].color = cc.textOver; s[i].background = cc.overoff; break;
3081
- case 3: s[i].color = cc.textOver; s[i].background = cc.over; break;
3082
- case 4: s[i].color = cc.textSelect; s[i].background = cc.select; break;
3121
+ case 1: s[i].color = cc.text; s[i].background = cc.button; break
3122
+ case 2: s[i].color = cc.textOver; s[i].background = cc.overoff; break
3123
+ case 3: s[i].color = cc.textOver; s[i].background = cc.over; break
3124
+ case 4: s[i].color = cc.textSelect; s[i].background = cc.select; break
3083
3125
 
3084
3126
  }
3085
3127
 
@@ -3127,17 +3169,20 @@ class Button extends Proto {
3127
3169
  let d = this.sa;
3128
3170
 
3129
3171
  let i = this.lng;
3130
- let dc = this.space;
3131
- let size = Math.floor( ( w-(dc*(i-1)) ) / i );
3172
+ let sx = this.colors.sx; //this.space;
3173
+ //let size = Math.floor( ( w-(dc*(i-1)) ) / i );
3174
+ let size = ( w-(sx*(i-1)) ) / i;
3132
3175
 
3133
3176
  if( this.bw ){
3134
3177
  size = this.bw < size ? this.bw : size;
3135
- d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5);
3178
+ //d = Math.floor((this.w-( (size * i) + (dc * (i-1)) ))*0.5)
3179
+ d = ((this.w-( (size * i) + (sx * (i-1)) ))*0.5);
3136
3180
  }
3137
3181
 
3138
3182
  while( i-- ){
3139
3183
 
3140
- this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
3184
+ //this.tmp[i] = [ Math.floor( d + ( size * i ) + ( dc * i )), size ];
3185
+ this.tmp[i] = [ ( d + ( size * i ) + ( sx * i )), size ];
3141
3186
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
3142
3187
 
3143
3188
  s[i+2].left = this.tmp[i][0] + 'px';
@@ -3171,7 +3216,6 @@ class Circular extends Proto {
3171
3216
  this.offset = new V2();
3172
3217
 
3173
3218
  this.h = o.h || this.w + 10;
3174
- this.top = 0;
3175
3219
 
3176
3220
  this.c[0].style.width = this.w +'px';
3177
3221
  this.c[0].style.display = 'block';
@@ -3287,7 +3331,7 @@ class Circular extends Proto {
3287
3331
 
3288
3332
  let off = this.offset;
3289
3333
  off.x = (this.w*0.5) - ( e.clientX - this.zone.x );
3290
- off.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.top );
3334
+ off.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.ytop );
3291
3335
 
3292
3336
  this.r = off.angle() - this.pi90;
3293
3337
  this.r = (((this.r%this.twoPi)+this.twoPi)%this.twoPi);
@@ -3392,6 +3436,8 @@ class Color extends Proto {
3392
3436
  this.cw = this.sb > 256 ? 256 : this.sb;
3393
3437
  if(o.cw != undefined ) this.cw = o.cw;
3394
3438
 
3439
+
3440
+
3395
3441
  // color up or down
3396
3442
  this.side = o.side || 'down';
3397
3443
  this.up = this.side === 'down' ? 0 : 1;
@@ -3402,15 +3448,19 @@ class Color extends Proto {
3402
3448
  this.decal = new V2();
3403
3449
  this.pp = new V2();
3404
3450
 
3405
- this.c[2] = this.dom( 'div', this.css.txt + 'height:'+(this.h-4)+'px;' + 'border-radius:'+this.radius+'px; line-height:'+(this.h-8)+'px;' );
3406
- this.s[2] = this.c[2].style;
3451
+ let cc = this.colors;
3452
+
3453
+ // this.c[2] = this.dom( 'div', this.css.txt + this.css.middle + 'top:1px; height:'+(this.h-2)+'px;' + 'border-radius:'+this.radius+'px; text-shadow:none; border:'+cc.borderSize+'px solid '+cc.border+';' )
3454
+
3455
+ this.c[2] = this.dom( 'div', `${this.css.txt} ${this.css.middle} top:1px; height:${this.h-2}px; border-radius:${this.radius}px; text-shadow:none; border:${cc.borderSize}px solid ${cc.border};` );
3456
+ //this.s[2] = this.c[2].style;
3407
3457
 
3408
- this.s[2].textShadow = 'none';
3458
+ //this.s[2].textShadow = 'none'
3409
3459
 
3410
- if( this.up ){
3460
+ /*if( this.up ){
3411
3461
  this.s[2].top = 'auto';
3412
3462
  this.s[2].bottom = '2px';
3413
- }
3463
+ }*/
3414
3464
 
3415
3465
  //this.c[0].style.textAlign = 'center';
3416
3466
  this.c[0].style.display = 'block';
@@ -3438,10 +3488,10 @@ class Color extends Proto {
3438
3488
  this.hue = 0;
3439
3489
  this.d = 256;
3440
3490
 
3441
- this.setColor( this.value );
3442
-
3443
3491
  this.init();
3444
3492
 
3493
+ this.setColor( this.value );
3494
+
3445
3495
  if( o.open !== undefined ) this.open();
3446
3496
 
3447
3497
  }
@@ -3449,20 +3499,17 @@ class Color extends Proto {
3449
3499
  testZone ( mx, my ) {
3450
3500
 
3451
3501
  let l = this.local;
3452
- if( l.x === -1 && l.y === -1 ) return '';
3453
-
3454
-
3502
+ if( l.x === -1 && l.y === -1 ) return ''
3455
3503
 
3456
3504
  if( this.up && this.isOpen ){
3457
3505
 
3458
- if( l.y > this.wfixe ) return 'title';
3459
- else return 'color';
3506
+ if( l.y > this.wfixe ) return 'title'
3507
+ else return 'color'
3460
3508
 
3461
3509
  } else {
3462
3510
 
3463
- if( l.y < this.baseH+2 ) return 'title';
3464
- else if( this.isOpen ) return 'color';
3465
-
3511
+ if( l.y < this.baseH+2 ) return 'title'
3512
+ else if( this.isOpen ) return 'color'
3466
3513
 
3467
3514
  }
3468
3515
 
@@ -3513,7 +3560,7 @@ class Color extends Proto {
3513
3560
 
3514
3561
  off = this.offset;
3515
3562
  off.x = e.clientX - ( this.zone.x + this.decal.x + this.mid );
3516
- off.y = e.clientY - ( this.zone.y + this.decal.y + this.mid );
3563
+ off.y = e.clientY - ( this.zone.y + this.decal.y + this.mid ) - this.ytop;
3517
3564
  d = off.length() * this.ratio;
3518
3565
  rr = off.angle();
3519
3566
  if(rr < 0) rr += 2 * T.PI;
@@ -3643,7 +3690,6 @@ class Color extends Proto {
3643
3690
 
3644
3691
  this.setSvg( this.c[3], 'fill', cc, 2, 0 );
3645
3692
 
3646
-
3647
3693
  this.s[2].background = this.bcolor;
3648
3694
  if(!this.notext) this.c[2].textContent = Tools.htmlToHex( this.bcolor );
3649
3695
 
@@ -3751,6 +3797,12 @@ class Color extends Proto {
3751
3797
  s[2].width = this.sb + 'px';
3752
3798
  s[2].left = this.sa + 'px';
3753
3799
 
3800
+ //console.log(this.sb)
3801
+
3802
+ this.cw = this.sb > 256 ? 256 : this.sb;
3803
+
3804
+
3805
+
3754
3806
  this.rSizeColor( this.cw );
3755
3807
 
3756
3808
  this.decal.x = Math.floor((this.w - this.wfixe) * 0.5);
@@ -3760,10 +3812,15 @@ class Color extends Proto {
3760
3812
 
3761
3813
  rSizeColor ( w ) {
3762
3814
 
3815
+
3763
3816
  if( w === this.wfixe ) return;
3764
3817
 
3818
+
3819
+
3765
3820
  this.wfixe = w;
3766
3821
 
3822
+
3823
+
3767
3824
  let s = this.s;
3768
3825
 
3769
3826
  //this.decal.x = Math.floor((this.w - this.wfixe) * 0.5);
@@ -3850,13 +3907,15 @@ class Fps extends Proto {
3850
3907
  }
3851
3908
 
3852
3909
 
3853
- let fltop = Math.floor(this.h*0.5)-6;
3910
+ let fltop = Math.floor(this.h*0.5)-3;
3911
+ const ccc = this.colors;
3854
3912
 
3855
3913
  this.c[1].textContent = this.txt;
3914
+ //this.c[1].innerHTML = '&#160;' + this.txt
3856
3915
  this.c[0].style.cursor = 'pointer';
3857
3916
  this.c[0].style.pointerEvents = 'auto';
3858
3917
 
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 '+ this.colors.border +';';
3918
+ 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
3919
 
3861
3920
  if( this.radius !== 0 ) panelCss += 'border-radius:' + this.radius+'px;';
3862
3921
 
@@ -3872,7 +3931,8 @@ class Fps extends Proto {
3872
3931
  //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
3932
 
3874
3933
  // arrow
3875
- 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'});
3934
+ 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'});
3935
+ //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
3936
 
3877
3937
  // result test
3878
3938
  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 +3942,18 @@ class Fps extends Proto {
3882
3942
 
3883
3943
  this.isShow = false;
3884
3944
 
3945
+
3946
+
3885
3947
  let s = this.s;
3886
3948
 
3887
- s[1].marginLeft = '10px';
3949
+ //s[1].marginLeft = '10px';
3888
3950
  s[1].lineHeight = this.h-4;
3889
- s[1].color = this.colors.text;
3951
+ s[1].color = ccc.text;
3952
+ //s[1].paddingLeft = '18px';
3890
3953
  //s[1].fontWeight = 'bold';
3891
3954
 
3892
3955
  if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
3893
- if( this.colors.gborder!=='none') s[0].border = '1px solid ' + this.colors.gborder;
3956
+ if( this.colors.gborder!=='none') s[0].border = '1px solid ' + ccc.gborder;
3894
3957
 
3895
3958
 
3896
3959
 
@@ -4009,7 +4072,7 @@ class Fps extends Proto {
4009
4072
 
4010
4073
  this.h = this.hplus + this.baseH;
4011
4074
 
4012
- this.setSvg( this.c[3], 'd', this.svgs.arrowDown );
4075
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
4013
4076
 
4014
4077
  if( this.group !== null ){ this.group.calc( this.hplus );}
4015
4078
  else if( this.isUI ) this.main.calc( this.hplus );
@@ -4029,7 +4092,7 @@ class Fps extends Proto {
4029
4092
 
4030
4093
  this.h = this.baseH;
4031
4094
 
4032
- this.setSvg( this.c[3], 'd', this.svgs.arrow );
4095
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4033
4096
 
4034
4097
  if( this.group !== null ){ this.group.calc( -this.hplus );}
4035
4098
  else if( this.isUI ) this.main.calc( -this.hplus );
@@ -4100,6 +4163,8 @@ class Fps extends Proto {
4100
4163
  let s = this.s;
4101
4164
  let w = this.w;
4102
4165
 
4166
+ s[3].left = ( this.sa + this.sb - 6 ) + 'px';
4167
+
4103
4168
  s[0].width = w + 'px';
4104
4169
  s[1].width = w + 'px';
4105
4170
  s[2].left = 10 + 'px';
@@ -4344,7 +4409,7 @@ class Graph extends Proto {
4344
4409
  nup = this.mode( this.isDown ? 2 : 1, name );
4345
4410
  //this.cursor( this.current !== -1 ? 'move' : 'pointer' );
4346
4411
  if(this.isDown){
4347
- this.v[name] = this.clamp( 1 - (( e.clientY - this.zone.y - this.top - 10 ) / this.gh) , 0, 1 );
4412
+ this.v[name] = this.clamp( 1 - (( e.clientY - this.zone.y - this.ytop - 10 ) / this.gh) , 0, 1 );
4348
4413
  this.update( true );
4349
4414
  }
4350
4415
 
@@ -4377,16 +4442,16 @@ class Graph extends Proto {
4377
4442
  wm = w + this.iw*0.5;
4378
4443
  wn = w + this.iw;
4379
4444
 
4380
- if(i===0) p+='M '+w+' '+ h + ' T ' + wm +' '+ h;
4445
+ if( i === 0 ) p+='M '+w+' '+ h + ' T ' + wm +' '+ h;
4381
4446
  else p += ' C ' + ow +' '+ oh + ',' + w +' '+ h + ',' + wm +' '+ h;
4382
- if(i === this.lng-1) p+=' T ' + wn +' '+ h;
4447
+ if( i === this.lng-1 ) p+=' T ' + wn +' '+ h;
4383
4448
 
4384
4449
  ow = wn;
4385
4450
  oh = h;
4386
4451
 
4387
4452
  }
4388
4453
 
4389
- return p;
4454
+ return p
4390
4455
 
4391
4456
  }
4392
4457
 
@@ -4400,7 +4465,6 @@ class Graph extends Proto {
4400
4465
 
4401
4466
  let gw = this.w - 28;
4402
4467
  let iw = ((gw-(4*(this.lng-1)))/this.lng);
4403
-
4404
4468
  let t = [];
4405
4469
 
4406
4470
  s[2].width = gw + 'px';
@@ -4434,46 +4498,65 @@ class Group extends Proto {
4434
4498
  this.current = -1;
4435
4499
  this.proto = null;
4436
4500
  this.isEmpty = true;
4437
- this.decal = 0;
4438
4501
 
4439
- this.baseH = this.h;
4502
+ this.decal = o.group ? 8 : 0;
4440
4503
 
4441
- let fltop = Math.floor(this.h*0.5)-6;
4442
-
4443
- this.isLine = o.line !== undefined ? o.line : false;
4504
+ this.baseH = this.h;
4444
4505
 
4445
- this.decal = 0;
4506
+ let fltop = Math.floor(this.h*0.5)-3;
4446
4507
 
4447
- if( o.group ){
4448
- this.decal = o.group.decal ? o.group.decal : 0;
4449
- this.decal += 6;
4450
- }
4508
+ const cc = this.colors;
4451
4509
 
4452
4510
  this.useFlex = true;
4453
4511
  let flexible = this.useFlex ? 'display:flex; flex-flow: row wrap;' : '';
4454
4512
 
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:10px; height:10px; left:0; top:'+fltop+'px;', { d:this.svgs.group, fill:this.colors.text, stroke:'none'});
4457
- 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'});
4458
- // bottom line
4459
- 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');
4513
+ this.c[2] = this.dom( 'div', this.css.basic + flexible + 'width:100%; left:0; height:auto; overflow:hidden; top:'+(this.h)+'px');
4514
+ 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'});
4460
4515
 
4461
- let s = this.s;
4462
- s[0].height = this.h + 'px';
4463
- s[1].height = this.h + 'px';
4464
- this.c[1].name = 'group';
4516
+ let bh = this.mtop === 0 ? this.margin : this.mtop;
4517
+
4518
+ this.c[4] = this.dom( 'div', this.css.basic + 'width:100%; left:0; height:'+(bh+1)+'px; top:'+((this.h-1))+'px; background:none;');
4465
4519
 
4466
- s[1].marginLeft = (10+this.decal)+'px';
4467
- s[1].lineHeight = this.h-4;
4468
- s[1].color = this.colors.text;
4469
- //s[1].fontWeight = 'bold';
4520
+ this.s;
4521
+ this.c[1].name = 'group';
4470
4522
 
4471
- if( this.radius !== 0 ) s[0].borderRadius = this.radius+'px';
4472
4523
  this.init();
4473
4524
 
4474
4525
  this.setBG( o.bg );
4475
4526
 
4476
- if( o.open !== undefined ) this.open();
4527
+ if( o.open ) this.open();
4528
+
4529
+ }
4530
+
4531
+ setBG ( bg ) {
4532
+
4533
+ const cc = this.colors;
4534
+ const s = this.s;
4535
+
4536
+ if( bg !== undefined ) cc.groups = bg;
4537
+ if(cc.groups === 'none') cc.groups = cc.background;
4538
+ cc.background = 'none';
4539
+
4540
+ s[0].background = 'none';
4541
+ s[1].background = cc.groups;
4542
+ s[2].background = cc.groups;
4543
+
4544
+ if( cc.gborder !== 'none' ){
4545
+ s[1].border = cc.borderSize+'px solid '+ cc.gborder;
4546
+ }
4547
+
4548
+ if( this.radius !== 0 ){
4549
+
4550
+ s[1].borderRadius = this.radius+'px';
4551
+ s[2].borderRadius = this.radius+'px';
4552
+
4553
+ }
4554
+
4555
+ /*let i = this.uis.length;
4556
+ while(i--){
4557
+ this.uis[i].setBG( 'none' );
4558
+ //this.uis[i].setBG( this.colors.background );
4559
+ }*/
4477
4560
 
4478
4561
  }
4479
4562
 
@@ -4484,11 +4567,13 @@ class Group extends Proto {
4484
4567
 
4485
4568
  let name = '';
4486
4569
 
4487
- if( l.y < this.baseH ) name = 'title';
4570
+ if( l.y < this.baseH + this.margin ) name = 'title';
4488
4571
  else {
4489
4572
  if( this.isOpen ) name = 'content';
4490
4573
  }
4491
4574
 
4575
+ //console.log(name)
4576
+
4492
4577
  return name;
4493
4578
 
4494
4579
  }
@@ -4532,16 +4617,23 @@ class Group extends Proto {
4532
4617
  switch( name ){
4533
4618
 
4534
4619
  case 'content':
4535
- this.cursor();
4620
+
4621
+ //this.cursor()
4622
+
4623
+ //if( this.marginDiv ) e.clientY -= this.margin * 0.5
4536
4624
 
4537
4625
  if( Roots.isMobile && type === 'mousedown' ) this.getNext( e, change );
4538
4626
 
4539
- if( this.proto ) protoChange = this.proto.handleEvent( e );
4627
+ if( this.proto ){
4628
+ //e.clientY -= this.margin
4629
+ protoChange = this.proto.handleEvent( e );
4630
+ }
4540
4631
 
4541
4632
  if( !Roots.lock ) this.getNext( e, change );
4542
4633
 
4543
4634
  break;
4544
4635
  case 'title':
4636
+ //this.cursor( this.isOpen ? 'n-resize':'s-resize' );
4545
4637
  this.cursor('pointer');
4546
4638
  if( type === 'mousedown' ){
4547
4639
  if( this.isOpen ) this.close();
@@ -4577,18 +4669,7 @@ class Group extends Proto {
4577
4669
 
4578
4670
  // ----------------------
4579
4671
 
4580
- setBG ( bg ) {
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
- }
4672
+
4592
4673
 
4593
4674
  add() {
4594
4675
 
@@ -4610,6 +4691,9 @@ class Group extends Proto {
4610
4691
  }
4611
4692
 
4612
4693
  let u = this.ADD.apply( this, a );
4694
+ //u.margin += this.margin
4695
+
4696
+ //console.log( u.margin )
4613
4697
 
4614
4698
  this.uis.push( u );
4615
4699
 
@@ -4669,9 +4753,9 @@ class Group extends Proto {
4669
4753
  let id = this.uis.indexOf( n );
4670
4754
 
4671
4755
  if ( id !== -1 ) {
4672
- this.calc( - ( this.uis[ id ].h + 1 ) );
4756
+ this.calc( - ( this.uis[ id ].h + this.margin ) );
4673
4757
  this.c[2].removeChild( this.uis[ id ].c[0] );
4674
- this.uis.splice( id, 1 );
4758
+ this.uis.splice( id, 1 );
4675
4759
 
4676
4760
  if( this.uis.length === 0 ){
4677
4761
  this.isEmpty = true;
@@ -4687,11 +4771,42 @@ class Group extends Proto {
4687
4771
 
4688
4772
  super.open();
4689
4773
 
4690
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
4774
+ this.setSvg( this.c[3], 'd', this.svgs.g2 );
4691
4775
  this.rSizeContent();
4692
4776
 
4693
- this.h - this.baseH;
4777
+ //let t = this.h - this.baseH
4778
+
4779
+ const s = this.s;
4780
+ const cc = this.colors;
4781
+
4782
+ //s[2].top = (this.h-1) + 'px'
4783
+ s[2].top = (this.h+this.mtop) + 'px';
4784
+ s[4].background = cc.groups;//'#0f0'
4785
+
4786
+ if(this.radius){
4787
+
4788
+ s[1].borderRadius = '0px';
4789
+ s[2].borderRadius = '0px';
4694
4790
 
4791
+
4792
+
4793
+ s[1].borderTopLeftRadius = this.radius+'px';
4794
+ s[1].borderTopRightRadius = this.radius+'px';
4795
+ s[2].borderBottomLeftRadius = this.radius+'px';
4796
+ s[2].borderBottomRightRadius = this.radius+'px';
4797
+ }
4798
+
4799
+ if( cc.gborder !== 'none' ){
4800
+
4801
+ s[4].borderLeft = cc.borderSize+'px solid '+ cc.gborder;
4802
+ s[4].borderRight = cc.borderSize+'px solid '+ cc.gborder;
4803
+
4804
+ s[2].border = cc.borderSize+'px solid '+ cc.gborder;
4805
+ s[2].borderTop = 'none';
4806
+ s[1].borderBottom = cc.borderSize+'px solid rgba(0,0,0,0)';
4807
+
4808
+ }
4809
+
4695
4810
  this.parentHeight();
4696
4811
 
4697
4812
  }
@@ -4700,11 +4815,29 @@ class Group extends Proto {
4700
4815
 
4701
4816
  super.close();
4702
4817
 
4703
- this.h - this.baseH;
4818
+ //let t = this.h - this.baseH
4819
+
4820
+ this.setSvg( this.c[3], 'd', this.svgs.g1 );
4704
4821
 
4705
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
4706
4822
  this.h = this.baseH;
4707
- this.s[0].height = this.h + 'px';
4823
+
4824
+ const s = this.s;
4825
+ const cc = this.colors;
4826
+
4827
+ s[0].height = this.h + 'px';
4828
+ //s[1].height = (this.h-2) + 'px'
4829
+ //s[2].top = this.h + 'px'
4830
+ s[2].top = (this.h+this.mtop) + 'px';
4831
+ s[4].background = 'none';
4832
+
4833
+ if( cc.gborder !== 'none' ){
4834
+
4835
+ s[4].border = 'none';
4836
+ s[2].border = 'none';
4837
+ s[1].border = cc.borderSize+'px solid '+ cc.gborder;
4838
+ }
4839
+
4840
+ if(this.radius) s[1].borderRadius = this.radius+'px';
4708
4841
 
4709
4842
  this.parentHeight();
4710
4843
 
@@ -4713,7 +4846,8 @@ class Group extends Proto {
4713
4846
  calcUis () {
4714
4847
 
4715
4848
  if( !this.isOpen ) this.h = this.baseH;
4716
- else this.h = Roots.calcUis( this.uis, this.zone, this.zone.y + this.baseH ) + this.baseH;
4849
+ //else this.h = Roots.calcUis( this.uis, this.zone, this.zone.y + this.baseH ) + this.baseH;
4850
+ else this.h = Roots.calcUis( this.uis, this.zone, this.zone.y + this.baseH + this.margin ) + this.baseH;
4717
4851
 
4718
4852
  this.s[0].height = this.h + 'px';
4719
4853
 
@@ -4751,14 +4885,36 @@ class Group extends Proto {
4751
4885
 
4752
4886
  let s = this.s;
4753
4887
 
4754
- s[3].left = ( this.sa + this.sb - 17 ) + 'px';
4888
+ this.w = this.w - this.decal;
4889
+
4890
+ s[3].left = ( this.sa + this.sb - 6 ) + 'px';
4891
+
4755
4892
  s[1].width = this.w + 'px';
4756
4893
  s[2].width = this.w + 'px';
4894
+ s[1].left = (this.decal) + 'px';
4895
+ s[2].left = (this.decal) + 'px';
4757
4896
 
4758
4897
  if( this.isOpen ) this.rSizeContent();
4759
4898
 
4760
4899
  }
4761
4900
 
4901
+ //
4902
+
4903
+ uiout() {
4904
+
4905
+ if( this.lock ) return;
4906
+ if(this.s) this.s[0].background = this.colors.background;
4907
+
4908
+ }
4909
+
4910
+ uiover() {
4911
+
4912
+ if( this.lock ) return;
4913
+ //if( this.isOpen ) return;
4914
+ if(this.s) this.s[0].background = this.colors.backgroundOver;
4915
+
4916
+ }
4917
+
4762
4918
  }
4763
4919
 
4764
4920
  class Joystick extends Proto {
@@ -4791,7 +4947,6 @@ class Joystick extends Proto {
4791
4947
  this.distance = (this.diam*0.5)*0.25;
4792
4948
 
4793
4949
  this.h = o.h || this.w + 10;
4794
- this.top = 0;
4795
4950
 
4796
4951
  this.c[0].style.width = this.w +'px';
4797
4952
 
@@ -4905,7 +5060,7 @@ class Joystick extends Proto {
4905
5060
  //this.tmp.y = this.radius - ( e.clientY - this.zone.y - this.top );
4906
5061
 
4907
5062
  this.tmp.x = (this.w*0.5) - ( e.clientX - this.zone.x );
4908
- this.tmp.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.top );
5063
+ this.tmp.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.ytop );
4909
5064
 
4910
5065
  let distance = this.tmp.length();
4911
5066
 
@@ -5023,7 +5178,6 @@ class Knob extends Proto {
5023
5178
  this.offset = new V2();
5024
5179
 
5025
5180
  this.h = o.h || this.w + 10;
5026
- this.top = 0;
5027
5181
 
5028
5182
  this.c[0].style.width = this.w +'px';
5029
5183
  this.c[0].style.display = 'block';
@@ -5142,7 +5296,7 @@ class Knob extends Proto {
5142
5296
  //off.y = this.radius - ( e.clientY - this.zone.y - this.top );
5143
5297
 
5144
5298
  off.x = (this.w*0.5) - ( e.clientX - this.zone.x );
5145
- off.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.top );
5299
+ off.y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.ytop );
5146
5300
 
5147
5301
  this.r = - Math.atan2( off.x, off.y );
5148
5302
 
@@ -5276,9 +5430,10 @@ class List extends Proto {
5276
5430
  this.tmpImage = {};
5277
5431
  this.tmpUrl = [];
5278
5432
 
5279
- //this.autoHeight = false;
5433
+ this.m = o.m !== undefined ? o.m : 5;
5280
5434
 
5281
- let align = o.align || 'center';
5435
+
5436
+ let align = o.align || 'left';
5282
5437
 
5283
5438
  // scroll size
5284
5439
  let ss = o.scrollSize || 10;
@@ -5297,14 +5452,12 @@ class List extends Proto {
5297
5452
  if( this.txt === '' ) this.p = 0;
5298
5453
 
5299
5454
 
5300
- let fltop = Math.floor(this.h*0.5)-5;
5455
+ let fltop = Math.floor(this.h*0.5)-3;
5301
5456
  let cc = this.colors;
5302
5457
 
5303
-
5304
-
5305
5458
  this.c[2] = this.dom( 'div', this.css.basic + 'top:0; display:none; border-radius:'+this.radius+'px;' );
5306
- 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:10px; height:10px; top:'+fltop+'px;', { d:this.svgs.arrow, fill:cc.text, stroke:'none'});
5459
+ 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;' );
5460
+ 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
5461
 
5309
5462
  this.scrollerBack = this.dom( 'div', this.css.basic + 'right:0px; width:'+ss+'px; background:'+cc.back+'; display:none;');
5310
5463
  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; ');
@@ -5315,12 +5468,12 @@ class List extends Proto {
5315
5468
  this.list = [];
5316
5469
  this.refObject = null;
5317
5470
 
5318
- if(o.list){
5471
+ if( o.list ){
5319
5472
  if( o.list instanceof Array ){
5320
5473
  this.list = o.list;
5321
- } else {
5474
+ } else if( o.list instanceof Object ){
5322
5475
  this.refObject = o.list;
5323
- for( let g in this.refObject ) this.list.push(g);
5476
+ for( let g in this.refObject ) this.list.push( g );
5324
5477
  }
5325
5478
  }
5326
5479
 
@@ -5330,7 +5483,7 @@ class List extends Proto {
5330
5483
 
5331
5484
  this.baseH = this.h;
5332
5485
 
5333
- this.itemHeight = o.itemHeight || (this.h-3);
5486
+ this.itemHeight = o.itemHeight || this.h;//(this.h-3);
5334
5487
 
5335
5488
  // force full list
5336
5489
  this.full = o.full || false;
@@ -5351,7 +5504,6 @@ class List extends Proto {
5351
5504
  this.c[2].style.top = 'auto';
5352
5505
  this.c[3].style.top = 'auto';
5353
5506
  this.c[4].style.top = 'auto';
5354
- //this.c[5].style.top = 'auto';
5355
5507
 
5356
5508
  this.c[2].style.bottom = this.h-2 + 'px';
5357
5509
  this.c[3].style.bottom = '1px';
@@ -5364,8 +5516,6 @@ class List extends Proto {
5364
5516
  this.listIn = this.dom( 'div', this.css.basic + 'left:0; top:0; width:100%; background:none;');
5365
5517
  this.listIn.name = 'list';
5366
5518
 
5367
-
5368
-
5369
5519
  this.topList = 0;
5370
5520
 
5371
5521
  this.c[2].appendChild( this.listIn );
@@ -5404,21 +5554,14 @@ class List extends Proto {
5404
5554
 
5405
5555
  //this.c[0].style.background = '#FF0000'
5406
5556
  if( this.isWithImage ) this.preloadImage();
5407
- // } else {
5408
- // populate list
5409
- this.setList( this.list );
5410
- this.init();
5411
- if( this.isOpenOnStart ) this.open( true );
5412
- // }
5413
-
5414
- }
5415
-
5416
- /*send ( v ) {
5557
+
5558
+ this.setList( this.list );
5559
+ this.init();
5560
+ if( this.isOpenOnStart ) this.open( true );
5417
5561
 
5418
- super.send( v );
5562
+ this.baseH += this.mtop;
5419
5563
 
5420
- //Proto.prototype.send.call( this, v );
5421
- }*/
5564
+ }
5422
5565
 
5423
5566
  // image list
5424
5567
 
@@ -5609,9 +5752,9 @@ class List extends Proto {
5609
5752
  this.value = this.list[ this.current.id ];
5610
5753
 
5611
5754
  if( this.isSelectable ) this.selected();
5612
- //this.value = this.refObject !== null ? this.refObject[this.list[this.current.id]] : this.list[this.current.id]
5613
- //this.value = this.current.textContent;
5614
- this.send( this.refObject !== null ? this.refObject[this.list[this.current.id]] : this.value );
5755
+
5756
+ //this.send( this.refObject !== null ? this.refObject[ this.list[this.current.id]] : this.value );
5757
+ this.send( this.value );
5615
5758
 
5616
5759
  if( !this.listOnly ) {
5617
5760
  this.close();
@@ -5643,6 +5786,7 @@ class List extends Proto {
5643
5786
  this.modeScroll(1);
5644
5787
  if( this.isDown ){
5645
5788
  this.modeScroll(2);
5789
+ //this.update( ( e.clientY - top ) - ( this.sh*0.5 ) );
5646
5790
  let top = this.zone.y+this.baseH-2;
5647
5791
  this.update( ( e.clientY - top ) - ( this.sh*0.5 ) );
5648
5792
  }
@@ -5786,8 +5930,8 @@ class List extends Proto {
5786
5930
  for( let i=0; i<this.length; i++ ){
5787
5931
 
5788
5932
  n = this.list[i];
5789
- 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+';' );
5790
- item.name = 'item'+i;
5933
+ 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+';' );
5934
+ item.name = 'item'+ i;
5791
5935
  item.id = i;
5792
5936
  item.select = false;
5793
5937
  item.posy = (this.itemHeight+1)*i;
@@ -5804,6 +5948,8 @@ class List extends Proto {
5804
5948
  let c = new Image();
5805
5949
  c.src = this.tmpCanvas.toDataURL();
5806
5950
 
5951
+ //item.style.marginLeft = (this.imageSize[0]+8)+'px'
5952
+
5807
5953
 
5808
5954
  /*let c = document.createElement('canvas')
5809
5955
 
@@ -5812,7 +5958,11 @@ class List extends Proto {
5812
5958
  let ctx = c.getContext("2d")
5813
5959
  ctx.fillStyle = this.canvasBg
5814
5960
  ctx.fillRect(0, 0, this.imageSize[0], this.imageSize[1])*/
5815
- c.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px';
5961
+
5962
+ //c.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px'
5963
+ // c.style.cssText =' flex-shrink: 0;'
5964
+
5965
+ c.style.cssText ='margin-right:4px;';
5816
5966
 
5817
5967
 
5818
5968
  //c.style.cssText = 'display:flex; align-content: flex-start; flex-wrap: wrap;'
@@ -5823,12 +5973,12 @@ class List extends Proto {
5823
5973
 
5824
5974
  }
5825
5975
 
5826
- if(this.dragout){
5976
+ if( this.dragout ){
5827
5977
 
5828
5978
  item.img = this.tmpImage[n];
5829
5979
 
5830
5980
  item.style.pointerEvents = 'auto';
5831
- item.draggable="true";
5981
+ item.draggable = "true";
5832
5982
 
5833
5983
  item.addEventListener('dragstart', this.dragstart || function(){ /*console.log('drag start')*/});
5834
5984
  item.addEventListener('drag', this.drag || function(){ /*console.log('drag start')*/});
@@ -5848,6 +5998,7 @@ class List extends Proto {
5848
5998
  }
5849
5999
 
5850
6000
  drawImage( name, image, x,y,w,h ){
6001
+
5851
6002
  this.tmpCtx.clearRect(0, 0, this.imageSize[0], this.imageSize[1]);
5852
6003
  this.tmpCtx.drawImage(image, x, y, w, h, 0, 0, this.imageSize[0], this.imageSize[1]);
5853
6004
  this.tmpImage[name].src = this.tmpCanvas.toDataURL();
@@ -5878,18 +6029,20 @@ class List extends Proto {
5878
6029
 
5879
6030
  setTopItem (){
5880
6031
 
5881
- if(this.staticTop) return;
6032
+ if( this.staticTop ) return;
5882
6033
 
5883
- if( this.isWithImage ){
6034
+ if( this.isWithImage ){
5884
6035
 
5885
- if( !this.preLoadComplete ) return;
6036
+ if(!this.preLoadComplete ) return;
5886
6037
 
5887
6038
  if(!this.c[3].children.length){
5888
6039
  this.canvas = document.createElement('canvas');
5889
6040
  this.canvas.width = this.imageSize[0];
5890
6041
  this.canvas.height = this.imageSize[1];
5891
- this.canvas.style.cssText = 'position:absolute; top:0px; left:0px;';
6042
+ this.canvas.style.cssText ='margin-right:4px;';
5892
6043
  this.ctx = this.canvas.getContext("2d");
6044
+ this.c[3].style.textAlign = 'left';
6045
+ this.c[3].style.justifyContent = 'left';
5893
6046
  this.c[3].appendChild( this.canvas );
5894
6047
  }
5895
6048
 
@@ -5906,13 +6059,11 @@ class List extends Proto {
5906
6059
  this.canvas = document.createElement('canvas');
5907
6060
  this.canvas.width = this.imageSize[0];
5908
6061
  this.canvas.height = this.imageSize[1];
5909
- ( this.h - this.imageSize[1] ) * 0.5;
5910
- this.canvas.style.cssText = 'position:relative; pointer-events:none; display:inline-block; float:left; margin-left:0px; margin-right:5px; top:2px';
5911
- //this.canvas.style.cssText = 'position:absolute; top:'+h+'px; left:5px;'
6062
+ this.canvas.style.cssText ='margin-right:4px;';
5912
6063
  this.ctx = this.canvas.getContext("2d");
5913
6064
  this.c[3].style.textAlign = 'left';
6065
+ this.c[3].style.justifyContent = 'left';
5914
6066
  this.c[3].appendChild( this.canvas );
5915
-
5916
6067
  }
5917
6068
 
5918
6069
  this.ctx.drawImage( this.tmpImage[ this.value ], 0, 0 );
@@ -5969,9 +6120,9 @@ class List extends Proto {
5969
6120
 
5970
6121
  if( this.up ){
5971
6122
  this.zone.y -= this.h - (this.baseH-10);
5972
- this.setSvg( this.c[4], 'd', this.svgs.arrowUp );
6123
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5973
6124
  } else {
5974
- this.setSvg( this.c[4], 'd', this.svgs.arrowDown );
6125
+ this.setSvg( this.c[4], 'd', this.svgs.g2 );
5975
6126
  }
5976
6127
 
5977
6128
  this.rSizeContent();
@@ -5995,7 +6146,7 @@ class List extends Proto {
5995
6146
  this.h = this.baseH;
5996
6147
  this.s[0].height = this.h + 'px';
5997
6148
  this.s[2].display = 'none';
5998
- this.setSvg( this.c[4], 'd', this.svgs.arrow );
6149
+ this.setSvg( this.c[4], 'd', this.svgs.g1 );
5999
6150
 
6000
6151
  this.zone.h = this.h;
6001
6152
 
@@ -6036,7 +6187,7 @@ class List extends Proto {
6036
6187
  s[3].width = w + 'px';
6037
6188
  s[3].left = d + 'px';
6038
6189
 
6039
- s[4].left = d + w - 17 + 'px';
6190
+ s[4].left = d + w - 15 + 'px';
6040
6191
 
6041
6192
  this.ww = w;
6042
6193
  if( this.max > this.maxHeight ) this.ww = w-this.ss;
@@ -6057,7 +6208,6 @@ class Numeric extends Proto {
6057
6208
  this.allway = o.allway || false;
6058
6209
 
6059
6210
  this.isDown = false;
6060
-
6061
6211
  this.value = [0];
6062
6212
  this.multy = 1;
6063
6213
  this.invmulty = 1;
@@ -6074,10 +6224,10 @@ class Numeric extends Proto {
6074
6224
  this.isDrag = o.drag || false;
6075
6225
 
6076
6226
  if( o.value !== undefined ){
6077
- if(!isNaN(o.value)){
6227
+ if( !isNaN(o.value) ){
6078
6228
  this.value = [o.value];
6079
6229
  } else if( o.value instanceof Array ){
6080
- this.value = o.value;
6230
+ this.value = o.value;
6081
6231
  this.isSingle = false;
6082
6232
  } else if( o.value instanceof Object ){
6083
6233
  this.value = [];
@@ -6085,16 +6235,14 @@ class Numeric extends Proto {
6085
6235
  if( o.value.y !== undefined ) this.value[1] = o.value.y;
6086
6236
  if( o.value.z !== undefined ) this.value[2] = o.value.z;
6087
6237
  if( o.value.w !== undefined ) this.value[3] = o.value.w;
6088
- this.isVector = true;
6089
6238
  this.isSingle = false;
6239
+ this.isVector = true;
6090
6240
  }
6091
6241
  }
6092
6242
 
6093
6243
  this.lng = this.value.length;
6094
6244
  this.tmp = [];
6095
6245
 
6096
-
6097
-
6098
6246
  this.current = -1;
6099
6247
  this.prev = { x:0, y:0, d:0, v:0 };
6100
6248
 
@@ -6108,24 +6256,23 @@ class Numeric extends Proto {
6108
6256
  let i = this.lng;
6109
6257
  while(i--){
6110
6258
 
6111
- if(this.isAngle) this.value[i] = (this.value[i] * 180 / Math.PI).toFixed( this.precision );
6112
- this.c[3+i] = this.dom( 'div', this.css.txtselect + ' height:'+(this.h-4)+'px; color:' + cc.text + '; background:' + cc.back + '; borderColor:' + cc.border+'; border-radius:'+this.radius+'px;');
6259
+ if( this.isAngle ) this.value[i] = (this.value[i] * 180 / Math.PI).toFixed( this.precision );
6260
+ this.c[3+i] = this.dom( 'div', this.css.txtselect + 'top:1px; height:'+(this.h-2)+'px; color:' + cc.text + '; background:' + cc.back + '; borderColor:' + cc.border+'; border-radius:'+this.radius+'px;');
6113
6261
  if(o.center) this.c[2+i].style.textAlign = 'center';
6114
6262
  this.c[3+i].textContent = this.value[i];
6115
6263
  this.c[3+i].style.color = this.colors.text;
6116
6264
  this.c[3+i].isNum = true;
6117
-
6118
6265
  this.cMode[i] = 0;
6119
6266
 
6120
6267
  }
6121
6268
 
6122
6269
  // selection
6123
6270
  this.selectId = 3 + this.lng;
6124
- this.c[this.selectId] = this.dom( 'div', this.css.txtselect + 'position:absolute; top:4px; height:' + (this.h-8) + 'px; padding:0px 0px; width:0px; color:' + cc.textSelect + '; background:' + cc.select + '; border:none; border-radius:0px;');
6271
+ this.c[this.selectId] = this.dom( 'div', this.css.txtselect + 'position:absolute; top:2px; height:' + (this.h-4) + 'px; padding:0px 0px; width:0px; color:' + cc.textSelect + '; background:' + cc.select + '; border:none; border-radius:0px;');
6125
6272
 
6126
6273
  // cursor
6127
6274
  this.cursorId = 4 + this.lng;
6128
- this.c[ this.cursorId ] = this.dom( 'div', this.css.basic + 'top:4px; height:' + (this.h-8) + 'px; width:0px; background:'+cc.text+';' );
6275
+ this.c[ this.cursorId ] = this.dom( 'div', this.css.basic + 'top:2px; height:' + (this.h-4) + 'px; width:0px; background:'+cc.text+';' );
6129
6276
 
6130
6277
  this.init();
6131
6278
  }
@@ -6133,42 +6280,19 @@ class Numeric extends Proto {
6133
6280
  testZone ( e ) {
6134
6281
 
6135
6282
  let l = this.local;
6136
- if( l.x === -1 && l.y === -1 ) return '';
6283
+ if( l.x === -1 && l.y === -1 ) return ''
6137
6284
 
6138
6285
  let i = this.lng;
6139
6286
  let t = this.tmp;
6140
-
6141
6287
 
6142
6288
  while( i-- ){
6143
- if( l.x>t[i][0] && l.x<t[i][2] ) return i;
6289
+ if( l.x>t[i][0] && l.x<t[i][2] ) return i
6144
6290
  }
6145
6291
 
6146
- return '';
6292
+ return ''
6147
6293
 
6148
6294
  }
6149
6295
 
6150
- /* mode: function ( n, name ) {
6151
-
6152
- if( n === this.cMode[name] ) return false;
6153
-
6154
- //let m;
6155
-
6156
- /*switch(n){
6157
-
6158
- case 0: m = this.colors.border; break;
6159
- case 1: m = this.colors.borderOver; break;
6160
- case 2: m = this.colors.borderSelect; break;
6161
-
6162
- }*/
6163
-
6164
- /* this.reset();
6165
- //this.c[name+2].style.borderColor = m;
6166
- this.cMode[name] = n;
6167
-
6168
- return true;
6169
-
6170
- },*/
6171
-
6172
6296
  // ----------------------
6173
6297
  // EVENTS
6174
6298
  // ----------------------
@@ -6181,25 +6305,13 @@ class Numeric extends Proto {
6181
6305
  this.isDown = true;
6182
6306
  if( name !== '' ){
6183
6307
  this.current = name;
6184
- this.prev = { x:e.clientX, y:e.clientY, d:0, v: this.isSingle ? parseFloat(this.value) : parseFloat( this.value[ this.current ] ) };
6308
+ this.prev = { x:e.clientX, y:e.clientY, d:0, v: this.isSingle ? parseFloat(this.value) : parseFloat( this.value[ this.current ] ) };
6185
6309
  this.setInput( this.c[ 3 + this.current ] );
6186
6310
  }
6187
- return this.mousemove( e );
6311
+ return this.mousemove( e )
6188
6312
  }
6189
6313
 
6190
- return false;
6191
- /*
6192
-
6193
- if( name === '' ) return false;
6194
-
6195
-
6196
- this.current = name;
6197
- this.isDown = true;
6198
-
6199
- this.prev = { x:e.clientX, y:e.clientY, d:0, v: this.isSingle ? parseFloat(this.value) : parseFloat( this.value[ this.current ] ) };
6200
-
6201
-
6202
- return this.mode( 2, name );*/
6314
+ return false
6203
6315
 
6204
6316
  }
6205
6317
 
@@ -6208,35 +6320,12 @@ class Numeric extends Proto {
6208
6320
  if( this.isDown ){
6209
6321
 
6210
6322
  this.isDown = false;
6211
- //this.current = -1;
6212
6323
  this.prev = { x:0, y:0, d:0, v:0 };
6213
6324
 
6214
- return this.mousemove( e );
6325
+ return this.mousemove( e )
6215
6326
  }
6216
6327
 
6217
- return false;
6218
-
6219
- /*let name = this.testZone( e );
6220
- this.isDown = false;
6221
-
6222
- if( this.current !== -1 ){
6223
-
6224
- //let tm = this.current;
6225
- let td = this.prev.d;
6226
-
6227
- this.current = -1;
6228
- this.prev = { x:0, y:0, d:0, v:0 };
6229
-
6230
- if( !td ){
6231
-
6232
- this.setInput( this.c[ 3 + name ] );
6233
- return true;//this.mode( 2, name );
6234
-
6235
- } else {
6236
- return this.reset();//this.mode( 0, tm );
6237
- }
6238
-
6239
- }*/
6328
+ return false
6240
6329
 
6241
6330
  }
6242
6331
 
@@ -6278,38 +6367,20 @@ class Numeric extends Proto {
6278
6367
 
6279
6368
  if( this.isDown ) x = e.clientX - this.zone.x -3;
6280
6369
  if( this.current !== -1 ) x -= this.tmp[this.current][0];
6281
- return this.upInput( x, this.isDown );
6370
+ return this.upInput( x, this.isDown )
6282
6371
 
6283
6372
  }
6284
6373
 
6285
-
6286
-
6287
-
6288
- return nup;
6374
+ return nup
6289
6375
 
6290
6376
  }
6291
6377
 
6292
- //keydown: function ( e ) { return true; },
6293
-
6294
6378
  // ----------------------
6295
6379
 
6296
6380
  reset () {
6297
6381
 
6298
6382
  let nup = false;
6299
- //this.isDown = false;
6300
-
6301
- //this.current = 0;
6302
-
6303
- /* let i = this.lng;
6304
- while(i--){
6305
- if(this.cMode[i]!==0){
6306
- this.cMode[i] = 0;
6307
- //this.c[2+i].style.borderColor = this.colors.border;
6308
- nup = true;
6309
- }
6310
- }*/
6311
-
6312
- return nup;
6383
+ return nup
6313
6384
 
6314
6385
  }
6315
6386
 
@@ -6317,17 +6388,12 @@ class Numeric extends Proto {
6317
6388
  setValue ( v ) {
6318
6389
 
6319
6390
  if( this.isVector ){
6320
-
6321
6391
  if( v.x !== undefined ) this.value[0] = v.x;
6322
6392
  if( v.y !== undefined ) this.value[1] = v.y;
6323
6393
  if( v.z !== undefined ) this.value[2] = v.z;
6324
6394
  if( v.w !== undefined ) this.value[3] = v.w;
6325
-
6326
6395
  } else {
6327
-
6328
- if( this.isSingle ) this.value = [v];
6329
- else this.value = v;
6330
-
6396
+ this.value = this.isSingle ? [v] : v;
6331
6397
  }
6332
6398
 
6333
6399
  this.update();
@@ -6363,9 +6429,7 @@ class Numeric extends Proto {
6363
6429
  if( this.objectLink !== null ){
6364
6430
 
6365
6431
  if( this.isVector ){
6366
-
6367
6432
  this.objectLink[ this.objectKey ].fromArray( v );
6368
-
6369
6433
  } else {
6370
6434
  this.objectLink[ this.objectKey ] = v;
6371
6435
  }
@@ -6373,7 +6437,6 @@ class Numeric extends Proto {
6373
6437
  }
6374
6438
 
6375
6439
  if( this.callback ) this.callback( v, this.objectKey );
6376
-
6377
6440
  this.isSend = false;
6378
6441
 
6379
6442
  }
@@ -6389,9 +6452,6 @@ class Numeric extends Proto {
6389
6452
  let d = this.current !== -1 ? this.tmp[this.current][0] + 5 : 0;
6390
6453
  s[this.cursorId].width = '1px';
6391
6454
  s[this.cursorId].left = ( d + c ) + 'px';
6392
- //s[2].left = ( d + e ) + 'px';
6393
- //s[2].width = w + 'px';
6394
-
6395
6455
  s[this.selectId].left = ( d + e ) + 'px';
6396
6456
  s[this.selectId].width = w + 'px';
6397
6457
  this.c[this.selectId].innerHTML = t;
@@ -6401,7 +6461,7 @@ class Numeric extends Proto {
6401
6461
  unselect () {
6402
6462
 
6403
6463
  let s = this.s;
6404
- if(!s) return;
6464
+ if(!s) return
6405
6465
  this.c[this.selectId].innerHTML = '';
6406
6466
  s[this.selectId].width = 0 + 'px';
6407
6467
  s[this.cursorId].width = 0 + 'px';
@@ -6427,10 +6487,8 @@ class Numeric extends Proto {
6427
6487
  ar[i] = this.value[i] * this.multy;
6428
6488
  }
6429
6489
 
6430
- if( !force ) return;
6431
-
6432
- if( this.isSingle ) this.send( ar[0] );
6433
- else this.send( ar );
6490
+ if( !force ) return
6491
+ this.send( this.isSingle ? ar[0] : ar );
6434
6492
 
6435
6493
  }
6436
6494
 
@@ -6441,12 +6499,15 @@ class Numeric extends Proto {
6441
6499
  rSize () {
6442
6500
 
6443
6501
  super.rSize();
6444
-
6445
- let w = Math.floor( ( this.sb + 5 ) / this.lng )-5;
6502
+ let sx = this.colors.sx;
6503
+ let ss = sx * (this.lng-1);
6504
+ let w = (this.sb-ss) / this.lng;//(( this.sb + sx ) / this.lng )-sx
6446
6505
  let s = this.s;
6447
6506
  let i = this.lng;
6507
+
6448
6508
  while(i--){
6449
- this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
6509
+ //this.tmp[i] = [ Math.floor( this.sa + ( w * i )+( 5 * i )), w ];
6510
+ this.tmp[i] = [ ( this.sa + ( w * i )+( sx * i )), w ];
6450
6511
  this.tmp[i][2] = this.tmp[i][0] + this.tmp[i][1];
6451
6512
  s[ 3 + i ].left = this.tmp[i][0] + 'px';
6452
6513
  s[ 3 + i ].width = this.tmp[i][1] + 'px';
@@ -6497,25 +6558,27 @@ class Slide extends Proto {
6497
6558
 
6498
6559
  if(this.model !== 0){
6499
6560
 
6500
- let h1 = 4, h2 = 8, ww = this.h-4, ra = 20;
6561
+ let r1 = 4, h1 = 4, h2 = 8, ww = this.h-6, ra = 16;
6501
6562
 
6502
6563
  if( this.model === 2 ){
6503
- h1 = 4;//2
6504
- h2 = 8;
6564
+ r1 = 0;
6565
+ h1 = 2;
6566
+ h2 = 4;
6505
6567
  ra = 2;
6506
- ww = (this.h-4)*0.5;
6568
+ ww = (this.h-6)*0.5;
6507
6569
  }
6508
6570
 
6509
- if(this.model === 3) this.c[5].style.visible = 'none';
6571
+ if( this.model === 3 ) this.c[5].style.visible = 'none';
6510
6572
 
6511
- this.c[4].style.borderRadius = h1 + 'px';
6573
+ this.c[4].style.borderRadius = r1 + 'px';
6512
6574
  this.c[4].style.height = h2 + 'px';
6513
6575
  this.c[4].style.top = (this.h*0.5) - h1 + 'px';
6514
- this.c[5].style.borderRadius = (h1*0.5) + 'px';
6576
+ this.c[5].style.borderRadius = (r1*0.5) + 'px';
6515
6577
  this.c[5].style.height = h1 + 'px';
6516
6578
  this.c[5].style.top = (this.h*0.5)-(h1*0.5) + 'px';
6517
6579
 
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;' );
6580
+ //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;' );
6581
+ 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
6582
  }
6520
6583
 
6521
6584
  this.init();
@@ -6658,23 +6721,15 @@ class Slide extends Proto {
6658
6721
  s[2].color = cc.text;
6659
6722
  s[4].background = cc.back;
6660
6723
  s[5].background = cc.text;
6724
+ if(this.model !== 0) s[6].background = cc.text;//cc.button;
6661
6725
  break;
6662
6726
  case 1: // scroll over
6663
6727
  //s[2].border = '1px dashed ' + this.colors.hide;
6664
6728
  s[2].color = cc.textOver;
6665
6729
  s[4].background = cc.back;
6666
6730
  s[5].background = cc.textOver;
6731
+ if(this.model !== 0) s[6].background = cc.textOver;//cc.overoff;
6667
6732
  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
6733
 
6679
6734
  }
6680
6735
  }
@@ -6740,17 +6795,17 @@ class TextInput extends Proto {
6740
6795
  let cc = this.colors;
6741
6796
 
6742
6797
  // text
6743
- this.c[2] = this.dom( 'div', this.css.txtselect + 'height:' + (this.h-4) + 'px; color:' + cc.text + '; background:' + cc.back + '; borderColor:' + cc.border+'; border-radius:'+this.radius+'px;' );
6798
+ this.c[2] = this.dom( 'div', this.css.txtselect + 'top:1px; height:' + (this.h-2) + 'px; color:' + cc.text + '; background:' + cc.back + '; borderColor:' + cc.border+'; border-radius:'+this.radius+'px;' );
6744
6799
  this.c[2].textContent = this.value;
6745
6800
 
6746
6801
  // selection
6747
- this.c[3] = this.dom( 'div', this.css.txtselect + 'position:absolute; top:4px; height:' + (this.h-8) + 'px; padding:0px 0px; width:0px; color:' + cc.textSelect + '; background:' + cc.select + '; border:none; border-radius:0px;');
6802
+ this.c[3] = this.dom( 'div', this.css.txtselect + 'position:absolute; top:2px; height:' + (this.h-4) + 'px; padding:0px 0px; width:0px; color:' + cc.textSelect + '; background:' + cc.select + '; border:none; border-radius:0px;');
6748
6803
 
6749
6804
  // cursor
6750
- this.c[4] = this.dom( 'div', this.css.basic + 'top:4px; height:' + (this.h-8) + 'px; width:0px; background:'+cc.text+';' );
6805
+ this.c[4] = this.dom( 'div', this.css.basic + 'top:2px; height:' + (this.h-4) + 'px; width:0px; background:'+cc.text+';' );
6751
6806
 
6752
6807
  // fake
6753
- this.c[5] = this.dom( 'div', this.css.txtselect + 'height:' + (this.h-4) + 'px; justify-content: center; font-style: italic; color:'+cc.border+';' );
6808
+ this.c[5] = this.dom( 'div', this.css.txtselect + 'top:1px; height:' + (this.h-2) + 'px; border:none; justify-content: center; font-style: italic; color:'+cc.border+';' );
6754
6809
  if( this.value === '' ) this.c[5].textContent = this.placeHolder;
6755
6810
 
6756
6811
 
@@ -6967,9 +7022,7 @@ class Select extends Proto {
6967
7022
  super( o );
6968
7023
 
6969
7024
  this.value = o.value || '';
6970
-
6971
7025
  this.isDown = false;
6972
-
6973
7026
  this.onActif = o.onActif || function(){};
6974
7027
 
6975
7028
  //let prefix = o.prefix || '';
@@ -6994,8 +7047,8 @@ class Select extends Proto {
6994
7047
  testZone ( e ) {
6995
7048
 
6996
7049
  let l = this.local;
6997
- if( l.x === -1 && l.y === -1 ) return '';
6998
- if( l.x > this.sa && l.x < this.sa+30 ) return 'over';
7050
+ if( l.x === -1 && l.y === -1 ) return ''
7051
+ if( l.x > this.sa && l.x < this.sa+30 ) return 'over'
6999
7052
  return '0'
7000
7053
 
7001
7054
  }
@@ -7010,10 +7063,10 @@ class Select extends Proto {
7010
7063
  //this.value = false;
7011
7064
  this.isDown = false;
7012
7065
  //this.send();
7013
- return this.mousemove( e );
7066
+ return this.mousemove( e )
7014
7067
  }
7015
7068
 
7016
- return false;
7069
+ return false
7017
7070
 
7018
7071
  }
7019
7072
 
@@ -7021,25 +7074,19 @@ class Select extends Proto {
7021
7074
 
7022
7075
  let name = this.testZone( e );
7023
7076
 
7024
- if( !name ) return false;
7077
+ if( !name ) return false
7025
7078
 
7026
7079
  this.isDown = true;
7027
7080
  //this.value = this.values[ name-2 ];
7028
7081
  //this.send();
7029
- return this.mousemove( e );
7082
+ return this.mousemove( e )
7030
7083
 
7031
7084
  }
7032
7085
 
7033
7086
  mousemove ( e ) {
7034
7087
 
7035
7088
  let up = false;
7036
-
7037
7089
  let name = this.testZone( e );
7038
- //let sel = false;
7039
-
7040
-
7041
-
7042
- //console.log(name)
7043
7090
 
7044
7091
  if( name === 'over' ){
7045
7092
  this.cursor('pointer');
@@ -7048,7 +7095,7 @@ class Select extends Proto {
7048
7095
  up = this.reset();
7049
7096
  }
7050
7097
 
7051
- return up;
7098
+ return up
7052
7099
 
7053
7100
  }
7054
7101
 
@@ -7104,7 +7151,7 @@ class Select extends Proto {
7104
7151
 
7105
7152
  }
7106
7153
 
7107
- return change;
7154
+ return change
7108
7155
 
7109
7156
 
7110
7157
 
@@ -7113,7 +7160,7 @@ class Select extends Proto {
7113
7160
  reset () {
7114
7161
 
7115
7162
  this.cursor();
7116
- return this.mode( this.isActif ? 4 : 1 );
7163
+ return this.mode( this.isActif ? 4 : 1 )
7117
7164
 
7118
7165
  }
7119
7166
 
@@ -7218,11 +7265,6 @@ class Bitmap extends Proto {
7218
7265
  let up = false;
7219
7266
 
7220
7267
  let name = this.testZone( e );
7221
- //let sel = false;
7222
-
7223
-
7224
-
7225
- //console.log(name)
7226
7268
 
7227
7269
  if( name === 'over' ){
7228
7270
  this.cursor('pointer');
@@ -7261,7 +7303,7 @@ class Bitmap extends Proto {
7261
7303
 
7262
7304
  if( this.img !== null ){
7263
7305
  if( this.objectLink !== null ) this.objectLink[ this.val ] = v;
7264
- if( this.callback ) this.callback( v, this.img, this.name );
7306
+ if( this.callback ) this.callback( this.value, this.img, this.name );
7265
7307
  }
7266
7308
 
7267
7309
  }
@@ -7283,15 +7325,6 @@ class Bitmap extends Proto {
7283
7325
 
7284
7326
  if( this.stat !== n ){
7285
7327
 
7286
- /*if( n===1 ) this.isActif = false
7287
-
7288
- if( n===3 ){
7289
- if( !this.isActif ){ this.isActif = true; n=4; this.onActif( this ); }
7290
- else { this.isActif = false; }
7291
- }
7292
-
7293
- if( n===2 && this.isActif ) n = 4;*/
7294
-
7295
7328
  this.stat = n;
7296
7329
 
7297
7330
  switch( n ){
@@ -7500,21 +7533,24 @@ class Grid extends Proto {
7500
7533
  this.value = o.value || null;
7501
7534
 
7502
7535
 
7536
+ let cc = this.colors;
7537
+
7538
+
7503
7539
  this.isSelectable = o.selectable || false;
7504
- this.spaces = o.spaces || [5,3];
7540
+ this.spaces = o.spaces || [cc.sx,cc.sy];
7505
7541
  this.bsize = o.bsize || [90,20];
7506
7542
 
7507
- if(o.h) this.bsize[1] = o.h;
7543
+ if( o.h ) this.bsize[1] = o.h;
7508
7544
  this.bsizeMax = this.bsize[0];
7509
7545
 
7510
-
7511
7546
  this.tmp = [];
7512
7547
  this.stat = [];
7513
7548
  this.grid = [ 2, Math.round( this.lng * 0.5 ) ];
7514
- this.h = this.grid[1] * ( this.bsize[1] + this.spaces[1] ) + this.spaces[1];
7549
+ this.h = ( this.grid[1] * this.bsize[1] ) + ( (this.grid[1]) * this.spaces[1] ) + 4 - (this.mtop*2); //+ (this.spaces[1] - this.mtop);
7515
7550
 
7516
7551
  this.c[1].textContent = '';
7517
- this.c[2] = this.dom( 'table', this.css.basic + 'width:100%; top:'+(this.spaces[1]-2)+'px; height:auto; border-collapse:separate; border:none; border-spacing: '+(this.spaces[0]-2)+'px '+(this.spaces[1]-2)+'px;' );
7552
+ //this.c[2] = this.dom( 'table', this.css.basic + 'width:100%; top:'+(this.spaces[1]-2)+'px; height:auto; border-collapse:separate; border:none; border-spacing: '+(this.spaces[0]-2)+'px '+(this.spaces[1]-2)+'px;' );
7553
+ this.c[2] = this.dom( 'table', this.css.basic + 'width:100%; border-spacing: '+(this.spaces[0]-2)+'px '+(this.spaces[1])+'px; border:none;' );
7518
7554
 
7519
7555
  let n = 0, b, td, tr, sel;
7520
7556
 
@@ -7522,13 +7558,11 @@ class Grid extends Proto {
7522
7558
  this.isDown = false;
7523
7559
  this.neverlock = true;
7524
7560
 
7525
- this.buttons = [];
7561
+ this.buttons = [];
7526
7562
  this.stat = [];
7527
7563
  this.tmpX = [];
7528
7564
  this.tmpY = [];
7529
7565
 
7530
- let cc = this.colors;
7531
-
7532
7566
  for( let i = 0; i < this.grid[1]; i++ ){
7533
7567
 
7534
7568
  tr = this.c[2].insertRow();
@@ -7569,6 +7603,8 @@ class Grid extends Proto {
7569
7603
  }
7570
7604
  }
7571
7605
 
7606
+ //this.s[0].border = 'none'
7607
+
7572
7608
  this.init();
7573
7609
 
7574
7610
  }
@@ -7577,6 +7613,8 @@ class Grid extends Proto {
7577
7613
 
7578
7614
  let l = this.local;
7579
7615
  if( l.x === -1 && l.y === -1 ) return -1;
7616
+
7617
+ l.y += this.mtop;
7580
7618
 
7581
7619
  let tx = this.tmpX;
7582
7620
  let ty = this.tmpY;
@@ -7831,7 +7869,6 @@ class Pad2D extends Proto {
7831
7869
 
7832
7870
 
7833
7871
  this.h = o.h || this.w + 10;
7834
- this.top = 0;
7835
7872
 
7836
7873
  this.c[0].style.width = this.w + 'px';
7837
7874
 
@@ -7845,6 +7882,8 @@ class Pad2D extends Proto {
7845
7882
 
7846
7883
  }
7847
7884
 
7885
+ //this.top -= this.margin
7886
+
7848
7887
  let cc = this.colors;
7849
7888
 
7850
7889
 
@@ -7878,6 +7917,8 @@ class Pad2D extends Proto {
7878
7917
 
7879
7918
  if( l.x === -1 && l.y === -1 ) return '';
7880
7919
 
7920
+
7921
+
7881
7922
  if( l.y <= this.c[ 1 ].offsetHeight ) return 'title';
7882
7923
  else if ( l.y > this.h - this.c[ 2 ].offsetHeight ) return 'text';
7883
7924
  else return 'pad';
@@ -7894,7 +7935,7 @@ class Pad2D extends Proto {
7894
7935
 
7895
7936
  this.isDown = false;
7896
7937
  return this.mode(0);
7897
-
7938
+
7898
7939
  }
7899
7940
 
7900
7941
  mousedown ( e ) {
@@ -7913,7 +7954,9 @@ class Pad2D extends Proto {
7913
7954
  if( !this.isDown ) return;
7914
7955
 
7915
7956
  let x = (this.w*0.5) - ( e.clientX - this.zone.x );
7916
- let y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.top );
7957
+ let y = (this.diam*0.5) - ( e.clientY - this.zone.y - this.ytop );
7958
+
7959
+
7917
7960
  let r = 256 / this.diam;
7918
7961
 
7919
7962
  x = -(x*r);
@@ -8070,7 +8113,7 @@ const add = function () {
8070
8113
 
8071
8114
  o = a[2];
8072
8115
  o.name = a[1];
8073
- if( type === 'list' ){ o.list = a[0][a[1]]; }
8116
+ if( type === 'list' && !o.list ){ o.list = a[0][a[1]]; }
8074
8117
  else o.value = a[0][a[1]];
8075
8118
 
8076
8119
  }
@@ -8214,6 +8257,9 @@ class Gui {
8214
8257
  //this.prevY = -1;
8215
8258
  this.sw = 0;
8216
8259
 
8260
+ this.margin = this.colors.sy;
8261
+ this.marginDiv = Tools.isDivid( this.margin );
8262
+
8217
8263
 
8218
8264
 
8219
8265
  // bottom and close height
@@ -8535,7 +8581,7 @@ class Gui {
8535
8581
 
8536
8582
  case 'content':
8537
8583
 
8538
- e.clientY = this.isScroll ? e.clientY + this.decal : e.clientY;
8584
+ e.clientY = this.isScroll ? e.clientY + this.decal : e.clientY;
8539
8585
 
8540
8586
  if( Roots.isMobile && type === 'mousedown' ) this.getNext( e, change );
8541
8587
 
@@ -8595,7 +8641,6 @@ class Gui {
8595
8641
  if( next !== this.current ){
8596
8642
  this.clearTarget();
8597
8643
  this.current = next;
8598
-
8599
8644
  this.isNewTarget = true;
8600
8645
 
8601
8646
  }
@@ -8769,7 +8814,7 @@ class Gui {
8769
8814
  while(i--){
8770
8815
  if( this.uis[i].value === name ){
8771
8816
  this.uis[i].selected( true );
8772
- if( this.isScroll ) this.update( ( i*(this.uis[i].h+1) )*this.ratio );
8817
+ if( this.isScroll ) this.update( ( i*(this.uis[i].h+this.margin) )*this.ratio );
8773
8818
  }
8774
8819
  }
8775
8820
 
@@ -8875,7 +8920,6 @@ class Gui {
8875
8920
 
8876
8921
 
8877
8922
  if( this.forceHeight && this.lockHeight ) this.content.style.height = this.forceHeight + 'px';
8878
-
8879
8923
  if( this.isCanvas ) this.draw( true );
8880
8924
 
8881
8925
  }
@@ -8889,11 +8933,8 @@ class Gui {
8889
8933
  if( w ) this.zone.w = w;
8890
8934
 
8891
8935
  this.zone.w = Math.floor( this.zone.w );
8892
-
8893
8936
  this.content.style.width = this.zone.w + 'px';
8894
-
8895
8937
  if( this.isCenter ) this.content.style.marginLeft = -(Math.floor(this.zone.w*0.5)) + 'px';
8896
-
8897
8938
  this.setItemWidth( this.zone.w - this.sw );
8898
8939
 
8899
8940
  }
@@ -8910,6 +8951,6 @@ class Gui {
8910
8951
 
8911
8952
  }
8912
8953
 
8913
- const REVISION = '4.2.1';
8954
+ const REVISION = '4.2.5';
8914
8955
 
8915
8956
  export { Files, Gui, Proto, REVISION, Tools, add };