lexgui 0.6.0 → 0.6.1

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.
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  var LX = {
9
- version: "0.6.0",
9
+ version: "0.6.1",
10
10
  ready: false,
11
11
  components: [], // Specific pre-build components
12
12
  signals: {}, // Events and triggers
@@ -85,7 +85,21 @@ LX.doAsync = doAsync;
85
85
  */
86
86
  function getSupportedDOMName( text )
87
87
  {
88
- return text.replace( /\s/g, '' ).replaceAll('@', '_').replaceAll('+', '_plus_').replaceAll( '.', '' );
88
+ console.assert( typeof text == "string", "getSupportedDOMName: Text is not a string!" );
89
+
90
+ let name = text.trim();
91
+
92
+ // Replace specific known symbols
93
+ name = name.replace( /@/g, '_at_' ).replace( /\+/g, '_plus_' ).replace( /\./g, '_dot_' );
94
+ name = name.replace( /[^a-zA-Z0-9_-]/g, '_' );
95
+
96
+ // prefix with an underscore if needed
97
+ if( /^[0-9]/.test( name ) )
98
+ {
99
+ name = '_' + name;
100
+ }
101
+
102
+ return name;
89
103
  }
90
104
 
91
105
  LX.getSupportedDOMName = getSupportedDOMName;
@@ -2296,7 +2310,7 @@ class DropdownMenu {
2296
2310
 
2297
2311
  console.assert( trigger, "DropdownMenu needs a DOM element as trigger!" );
2298
2312
 
2299
- if( DropdownMenu.currentMenu )
2313
+ if( DropdownMenu.currentMenu || !items?.length )
2300
2314
  {
2301
2315
  DropdownMenu.currentMenu.destroy();
2302
2316
  this.invalid = true;
@@ -2314,6 +2328,7 @@ class DropdownMenu {
2314
2328
  this.align = options.align ?? "center";
2315
2329
  this.avoidCollisions = options.avoidCollisions ?? true;
2316
2330
  this.onBlur = options.onBlur;
2331
+ this.inPlace = false;
2317
2332
 
2318
2333
  this.root = document.createElement( "div" );
2319
2334
  this.root.id = "root";
@@ -2333,7 +2348,8 @@ class DropdownMenu {
2333
2348
 
2334
2349
  this._onClick = e => {
2335
2350
 
2336
- if( e.target && ( this.root.contains( e.target ) || e.target == this._trigger ) )
2351
+ // Check if the click is inside a menu or on the trigger
2352
+ if( e.target && ( e.target.closest( ".lexdropdownmenu" ) != undefined || e.target == this._trigger ) )
2337
2353
  {
2338
2354
  return;
2339
2355
  }
@@ -2341,7 +2357,8 @@ class DropdownMenu {
2341
2357
  this.destroy( true );
2342
2358
  };
2343
2359
 
2344
- document.body.addEventListener( "click", this._onClick );
2360
+ document.body.addEventListener( "mousedown", this._onClick, true );
2361
+ document.body.addEventListener( "focusin", this._onClick, true );
2345
2362
  }, 10 );
2346
2363
  }
2347
2364
 
@@ -2351,7 +2368,8 @@ class DropdownMenu {
2351
2368
 
2352
2369
  delete this._trigger.ddm;
2353
2370
 
2354
- document.body.removeEventListener( "click", this._onClick );
2371
+ document.body.removeEventListener( "mousedown", this._onClick, true );
2372
+ document.body.removeEventListener( "focusin", this._onClick, true );
2355
2373
 
2356
2374
  LX.root.querySelectorAll( ".lexdropdownmenu" ).forEach( m => { m.remove(); } );
2357
2375
 
@@ -2376,7 +2394,7 @@ class DropdownMenu {
2376
2394
  let newParent = document.createElement( "div" );
2377
2395
  newParent.tabIndex = "1";
2378
2396
  newParent.className = "lexdropdownmenu";
2379
- newParent.id = parentDom.id;
2397
+ newParent.dataset["id"] = parentDom.dataset["id"];
2380
2398
  newParent.dataset["side"] = "right"; // submenus always come from the right
2381
2399
  LX.root.appendChild( newParent );
2382
2400
 
@@ -2408,7 +2426,7 @@ class DropdownMenu {
2408
2426
  }
2409
2427
 
2410
2428
  const key = item.name ?? item;
2411
- const pKey = key.replace( /\s/g, '' ).replaceAll( '.', '' );
2429
+ const pKey = LX.getSupportedDOMName( key );
2412
2430
 
2413
2431
  // Item already created
2414
2432
  if( parentDom.querySelector( "#" + pKey ) )
@@ -2418,7 +2436,7 @@ class DropdownMenu {
2418
2436
 
2419
2437
  const menuItem = document.createElement('div');
2420
2438
  menuItem.className = "lexdropdownmenuitem" + ( item.name ? "" : " label" ) + ( item.disabled ?? false ? " disabled" : "" ) + ( ` ${ item.className ?? "" }` );
2421
- menuItem.id = pKey;
2439
+ menuItem.dataset["id"] = pKey;
2422
2440
  menuItem.innerHTML = `<span>${ key }</span>`;
2423
2441
  menuItem.tabIndex = "1";
2424
2442
  parentDom.appendChild( menuItem );
@@ -2504,24 +2522,24 @@ class DropdownMenu {
2504
2522
 
2505
2523
  menuItem.addEventListener("mouseover", e => {
2506
2524
 
2507
- let path = menuItem.id;
2525
+ let path = menuItem.dataset["id"];
2508
2526
  let p = parentDom;
2509
2527
 
2510
2528
  while( p )
2511
2529
  {
2512
- path += "/" + p.id;
2530
+ path += "/" + p.dataset["id"];
2513
2531
  p = p.currentParent?.parentElement;
2514
2532
  }
2515
2533
 
2516
2534
  LX.root.querySelectorAll( ".lexdropdownmenu" ).forEach( m => {
2517
- if( !path.includes( m.id ) )
2535
+ if( !path.includes( m.dataset["id"] ) )
2518
2536
  {
2519
2537
  m.currentParent.built = false;
2520
2538
  m.remove();
2521
2539
  }
2522
2540
  } );
2523
2541
 
2524
- if( item.submenu )
2542
+ if( item.submenu && this.inPlace )
2525
2543
  {
2526
2544
  if( menuItem.built )
2527
2545
  {
@@ -2595,6 +2613,7 @@ class DropdownMenu {
2595
2613
 
2596
2614
  this.root.style.left = `${ position[ 0 ] }px`;
2597
2615
  this.root.style.top = `${ position[ 1 ] }px`;
2616
+ this.inPlace = true;
2598
2617
  }
2599
2618
 
2600
2619
  _addSeparator( parent ) {
@@ -3456,6 +3475,7 @@ class Area {
3456
3475
  const type = options.type ?? "horizontal";
3457
3476
  const sizes = options.sizes || [ "50%", "50%" ];
3458
3477
  const auto = (options.sizes === 'auto') || ( options.sizes && options.sizes[ 0 ] == "auto" && options.sizes[ 1 ] == "auto" );
3478
+ const rect = this.root.getBoundingClientRect();
3459
3479
 
3460
3480
  // Secondary area fills space
3461
3481
  if( !sizes[ 1 ] || ( sizes[ 0 ] != "auto" && sizes[ 1 ] == "auto" ) )
@@ -3506,7 +3526,7 @@ class Area {
3506
3526
 
3507
3527
  if( !fixedSize )
3508
3528
  {
3509
- const parentWidth = this.root.offsetWidth;
3529
+ const parentWidth = rect.width;
3510
3530
  const leftPx = parsePixelSize( sizes[ 0 ], parentWidth );
3511
3531
  const rightPx = parsePixelSize( sizes[ 1 ], parentWidth );
3512
3532
  const leftPercent = ( leftPx / parentWidth ) * 100;
@@ -3530,10 +3550,11 @@ class Area {
3530
3550
  if( auto )
3531
3551
  {
3532
3552
  primarySize[ 1 ] = "auto";
3553
+ secondarySize[ 1 ] = "auto";
3533
3554
  }
3534
3555
  else if( !fixedSize )
3535
3556
  {
3536
- const parentHeight = this.root.offsetHeight;
3557
+ const parentHeight = rect.height;
3537
3558
  const topPx = parsePixelSize( sizes[ 0 ], parentHeight );
3538
3559
  const bottomPx = parsePixelSize( sizes[ 1 ], parentHeight );
3539
3560
  const topPercent = ( topPx / parentHeight ) * 100;
@@ -3556,6 +3577,72 @@ class Area {
3556
3577
  let area1 = new Area( { width: primarySize[ 0 ], height: primarySize[ 1 ], skipAppend: true, className: "split" + ( options.menubar || options.sidebar ? "" : " origin" ) } );
3557
3578
  let area2 = new Area( { width: secondarySize[ 0 ], height: secondarySize[ 1 ], skipAppend: true, className: "split" } );
3558
3579
 
3580
+ /*
3581
+ If the parent area is not in the DOM, we need to wait for the resize event to get the its correct size
3582
+ and set the sizes of the split areas accordingly.
3583
+ */
3584
+ if( !fixedSize && ( !rect.width || !rect.height ) )
3585
+ {
3586
+ const observer = new ResizeObserver( entries => {
3587
+
3588
+ console.assert( entries.length == 1, "AreaResizeObserver: more than one entry" );
3589
+
3590
+ const rect = entries[ 0 ].contentRect;
3591
+ if( !rect.width || !rect.height )
3592
+ {
3593
+ return;
3594
+ }
3595
+
3596
+ this._update( [ rect.width, rect.height ], false );
3597
+
3598
+ // On auto splits, we only need to set the size of the parent area
3599
+ if( !auto )
3600
+ {
3601
+ if( type == "horizontal" )
3602
+ {
3603
+ const parentWidth = rect.width;
3604
+ const leftPx = parsePixelSize( sizes[ 0 ], parentWidth );
3605
+ const rightPx = parsePixelSize( sizes[ 1 ], parentWidth );
3606
+ const leftPercent = ( leftPx / parentWidth ) * 100;
3607
+ const rightPercent = ( rightPx / parentWidth ) * 100;
3608
+
3609
+ // Style using percentages
3610
+ primarySize[ 0 ] = `calc(${ leftPercent }% - ${ splitbarOffset }px)`;
3611
+ secondarySize[ 0 ] = `calc(${ rightPercent }% - ${ splitbarOffset }px)`;
3612
+ }
3613
+ else // vertical
3614
+ {
3615
+ const parentHeight = rect.height;
3616
+ const topPx = parsePixelSize( sizes[ 0 ], parentHeight );
3617
+ const bottomPx = parsePixelSize( sizes[ 1 ], parentHeight );
3618
+ const topPercent = ( topPx / parentHeight ) * 100;
3619
+ const bottomPercent = ( bottomPx / parentHeight ) * 100;
3620
+
3621
+ primarySize[ 1 ] = ( sizes[ 0 ] == "auto" ? "auto" : `calc(${ topPercent }% - ${ splitbarOffset }px)`);
3622
+ secondarySize[ 1 ] = ( sizes[ 1 ] == "auto" ? "auto" : `calc(${ bottomPercent }% - ${ splitbarOffset }px)`);
3623
+ }
3624
+
3625
+ area1.root.style.width = primarySize[ 0 ];
3626
+ area1.root.style.height = primarySize[ 1 ];
3627
+
3628
+ area2.root.style.width = secondarySize[ 0 ];
3629
+ area2.root.style.height = secondarySize[ 1 ];
3630
+ }
3631
+
3632
+ area1._update();
3633
+ area2._update();
3634
+
3635
+ // Stop observing
3636
+ observer.disconnect();
3637
+ });
3638
+
3639
+ // Observe the parent area until the DOM is ready
3640
+ // and the size is set correctly.
3641
+ doAsync( () => {
3642
+ observer.observe( this.root );
3643
+ }, 100 );
3644
+ }
3645
+
3559
3646
  if( auto && type == "vertical" )
3560
3647
  {
3561
3648
  // Listen resize event on first area
@@ -3565,6 +3652,7 @@ class Area {
3565
3652
  const size = entry.target.getComputedSize();
3566
3653
  area2.root.style.height = "calc(100% - " + ( size.height ) + "px )";
3567
3654
  }
3655
+ resizeObserver.disconnect();
3568
3656
  });
3569
3657
 
3570
3658
  resizeObserver.observe( area1.root );
@@ -3608,7 +3696,7 @@ class Area {
3608
3696
  this.type = type;
3609
3697
 
3610
3698
  // Update sizes
3611
- this._update();
3699
+ this._update( rect.width || rect.height ? [ rect.width, rect.height ] : undefined );
3612
3700
 
3613
3701
  if( !resize )
3614
3702
  {
@@ -3665,6 +3753,11 @@ class Area {
3665
3753
  this.minHeight = minh;
3666
3754
  this.maxWidth = maxw;
3667
3755
  this.maxHeight = maxh;
3756
+
3757
+ if( minw != 0 ) this.root.style.minWidth = `${ minw }px`;
3758
+ if( minh != 0 ) this.root.style.minHeight = `${ minh }px`;
3759
+ if( maxw != Infinity ) this.root.style.maxWidth = `${ maxw }px`;
3760
+ if( maxh != Infinity ) this.root.style.maxHeight = `${ maxh }px`;
3668
3761
  }
3669
3762
 
3670
3763
  /**
@@ -3724,7 +3817,7 @@ class Area {
3724
3817
  {
3725
3818
  this.offset = area2.root.offsetHeight;
3726
3819
  area2.root.classList.add("fadeout-vertical");
3727
- this._moveSplit(-Infinity, true);
3820
+ this._moveSplit( -Infinity, true );
3728
3821
 
3729
3822
  }
3730
3823
  else
@@ -4032,7 +4125,6 @@ class Area {
4032
4125
  {
4033
4126
  _addButton( b );
4034
4127
  }
4035
-
4036
4128
  }
4037
4129
 
4038
4130
  // Add floating info
@@ -4124,12 +4216,12 @@ class Area {
4124
4216
 
4125
4217
  if( a1.maxWidth != Infinity )
4126
4218
  {
4127
- a2Root.style.minWidth = "calc( 100% - " + parseInt( a1.maxWidth ) + "px" + " )";
4219
+ a2Root.style.minWidth = `calc( 100% - ${ parseInt( a1.maxWidth ) }px )`;
4128
4220
  }
4129
4221
  }
4130
4222
  else
4131
4223
  {
4132
- var size = Math.max( ( a2Root.offsetHeight + dt ) + a2.offset, parseInt(a2.minHeight) );
4224
+ var size = Math.max( ( a2Root.offsetHeight + dt ) + a2.offset, parseInt( a2.minHeight ) );
4133
4225
  if( forceWidth ) size = forceWidth;
4134
4226
 
4135
4227
  const parentHeight = this.size[ 1 ];
@@ -4143,7 +4235,10 @@ class Area {
4143
4235
  a2Root.style.height = `${ bottomPercent }%`;
4144
4236
  a2Root.style.height = `${ bottomPercent }%`;
4145
4237
 
4146
- a1Root.style.minHeight = a1.minHeight + "px";
4238
+ if( a1.maxHeight != Infinity )
4239
+ {
4240
+ a2Root.style.minHeight = `calc( 100% - ${ parseInt( a1.maxHeight ) }px )`;
4241
+ }
4147
4242
  }
4148
4243
 
4149
4244
  if( !forceAnimation )
@@ -4165,15 +4260,24 @@ class Area {
4165
4260
  delete this.splitBar;
4166
4261
  }
4167
4262
 
4168
- _update() {
4169
-
4170
- const rect = this.root.getBoundingClientRect();
4263
+ _update( newSize, propagate = true ) {
4171
4264
 
4172
- this.size = [ rect.width, rect.height ];
4265
+ if( !newSize )
4266
+ {
4267
+ const rect = this.root.getBoundingClientRect();
4268
+ this.size = [ rect.width, rect.height ];
4269
+ }
4270
+ else
4271
+ {
4272
+ this.size = newSize;
4273
+ }
4173
4274
 
4174
- for( var i = 0; i < this.sections.length; i++ )
4275
+ if( propagate )
4175
4276
  {
4176
- this.sections[ i ]._update();
4277
+ for( var i = 0; i < this.sections.length; i++ )
4278
+ {
4279
+ this.sections[ i ]._update();
4280
+ }
4177
4281
  }
4178
4282
  }
4179
4283
  };
@@ -4573,7 +4677,7 @@ class Menubar {
4573
4677
 
4574
4678
  this.root.querySelectorAll(".lexmenuentry").forEach( e => {
4575
4679
  e.classList.remove( 'selected' );
4576
- e.built = false;
4680
+ delete e.dataset[ "built" ];
4577
4681
  } );
4578
4682
 
4579
4683
  if( this._currentDropdown )
@@ -4595,7 +4699,7 @@ class Menubar {
4595
4699
  for( let item of this.items )
4596
4700
  {
4597
4701
  let key = item.name;
4598
- let pKey = key.replace( /\s/g, '' ).replaceAll( '.', '' );
4702
+ let pKey = LX.getSupportedDOMName( key );
4599
4703
 
4600
4704
  // Item already created
4601
4705
  if( this.root.querySelector( "#" + pKey ) )
@@ -4614,8 +4718,8 @@ class Menubar {
4614
4718
  const _showEntry = () => {
4615
4719
  this._resetMenubar(true);
4616
4720
  entry.classList.add( "selected" );
4617
- entry.built = true;
4618
- this._currentDropdown = addDropdownMenu( entry, item.submenu, { side: "bottom", align: "start", onBlur: () => {
4721
+ entry.dataset["built"] = "true";
4722
+ this._currentDropdown = addDropdownMenu( entry, item.submenu ?? [], { side: "bottom", align: "start", onBlur: () => {
4619
4723
  this._resetMenubar();
4620
4724
  } });
4621
4725
  };
@@ -4635,7 +4739,7 @@ class Menubar {
4635
4739
 
4636
4740
  entry.addEventListener( "mouseover", (e) => {
4637
4741
 
4638
- if( this.focused && !entry.built )
4742
+ if( this.focused && !( entry.dataset[ "built" ] ?? false ) )
4639
4743
  {
4640
4744
  _showEntry();
4641
4745
  }
@@ -5228,7 +5332,7 @@ class SideBar {
5228
5332
 
5229
5333
  select( name ) {
5230
5334
 
5231
- let pKey = name.replace( /\s/g, '' ).replaceAll( '.', '' );
5335
+ let pKey = LX.getSupportedDOMName( name );
5232
5336
 
5233
5337
  const entry = this.items.find( v => v.name === pKey );
5234
5338
 
@@ -5266,7 +5370,7 @@ class SideBar {
5266
5370
  continue;
5267
5371
  }
5268
5372
 
5269
- let pKey = key.replace( /\s/g, '' ).replaceAll( '.', '' );
5373
+ let pKey = LX.getSupportedDOMName( key );
5270
5374
  let currentGroup = null;
5271
5375
 
5272
5376
  let entry = document.createElement( 'div' );
@@ -6983,7 +7087,7 @@ class ComboButtons extends Widget {
6983
7087
  buttonEl.classList.add( options.buttonClass );
6984
7088
  }
6985
7089
 
6986
- if( shouldSelect && b.selected )
7090
+ if( shouldSelect && ( b.selected || options.selected?.includes( b.value ) ) )
6987
7091
  {
6988
7092
  buttonEl.classList.add("selected");
6989
7093
  currentValue = ( currentValue ).concat( [ b.value ] );
@@ -7032,7 +7136,7 @@ class ComboButtons extends Widget {
7032
7136
 
7033
7137
  if( !shouldToggle && currentValue.length > 1 )
7034
7138
  {
7035
- console.error( `Enable _options.toggle_ to allow selecting multiple options in ComboButtons.` )
7139
+ console.error( `Enable _options.toggle_ to allow selecting multiple options in ComboButtons.` );
7036
7140
  return;
7037
7141
  }
7038
7142
 
@@ -7046,9 +7150,12 @@ class ComboButtons extends Widget {
7046
7150
 
7047
7151
  if( currentValue.length > 1 )
7048
7152
  {
7049
- options.toggle = true;
7050
- shouldToggle = shouldSelect;
7051
- console.warn( `Multiple options selected in '${ name }' ComboButtons. Enabling _toggle_ mode.` );
7153
+ if( !shouldToggle )
7154
+ {
7155
+ options.toggle = true;
7156
+ shouldToggle = shouldSelect;
7157
+ console.warn( `Multiple options selected in '${ name }' ComboButtons. Enabling _toggle_ mode.` );
7158
+ }
7052
7159
  }
7053
7160
  else
7054
7161
  {
@@ -8685,7 +8792,7 @@ class NumberInput extends Widget {
8685
8792
  vecinput.value = vecinput.iValue = value;
8686
8793
  valueBox.appendChild( vecinput );
8687
8794
 
8688
- const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden", svgClass: "sm" } );
8795
+ const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden-opacity", svgClass: "sm" } );
8689
8796
  valueBox.appendChild( dragIcon );
8690
8797
 
8691
8798
  if( options.units )
@@ -8778,7 +8885,7 @@ class NumberInput extends Widget {
8778
8885
  doc.addEventListener( 'mousemove', innerMouseMove );
8779
8886
  doc.addEventListener( 'mouseup', innerMouseUp );
8780
8887
  document.body.classList.add( 'noevents' );
8781
- dragIcon.classList.remove( 'hidden' );
8888
+ dragIcon.classList.remove( 'hidden-opacity' );
8782
8889
  e.stopImmediatePropagation();
8783
8890
  e.stopPropagation();
8784
8891
 
@@ -8816,7 +8923,7 @@ class NumberInput extends Widget {
8816
8923
  doc.removeEventListener( 'mousemove', innerMouseMove );
8817
8924
  doc.removeEventListener( 'mouseup', innerMouseUp );
8818
8925
  document.body.classList.remove( 'noevents' );
8819
- dragIcon.classList.add( 'hidden' );
8926
+ dragIcon.classList.add( 'hidden-opacity' );
8820
8927
 
8821
8928
  if( document.pointerLockElement )
8822
8929
  {
@@ -8911,6 +9018,7 @@ class Vector extends Widget {
8911
9018
  vecinput.id = "vec" + numComponents + "_" + simple_guidGenerator();
8912
9019
  vecinput.idx = i;
8913
9020
  vectorInputs[ i ] = vecinput;
9021
+ box.appendChild( vecinput );
8914
9022
 
8915
9023
  if( value[ i ].constructor == Number )
8916
9024
  {
@@ -8920,7 +9028,7 @@ class Vector extends Widget {
8920
9028
 
8921
9029
  vecinput.value = vecinput.iValue = value[ i ];
8922
9030
 
8923
- const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden", svgClass: "sm" } );
9031
+ const dragIcon = LX.makeIcon( "MoveVertical", { iconClass: "drag-icon hidden-opacity", svgClass: "sm" } );
8924
9032
  box.appendChild( dragIcon );
8925
9033
 
8926
9034
  if( options.disabled )
@@ -8992,7 +9100,7 @@ class Vector extends Widget {
8992
9100
  doc.addEventListener( 'mousemove', innerMouseMove );
8993
9101
  doc.addEventListener( 'mouseup', innerMouseUp );
8994
9102
  document.body.classList.add( 'noevents' );
8995
- dragIcon.classList.remove( 'hidden' );
9103
+ dragIcon.classList.remove( 'hidden-opacity' );
8996
9104
  e.stopImmediatePropagation();
8997
9105
  e.stopPropagation();
8998
9106
 
@@ -9042,7 +9150,7 @@ class Vector extends Widget {
9042
9150
  doc.removeEventListener( 'mousemove', innerMouseMove );
9043
9151
  doc.removeEventListener( 'mouseup', innerMouseUp );
9044
9152
  document.body.classList.remove( 'noevents' );
9045
- dragIcon.classList.add('hidden');
9153
+ dragIcon.classList.add('hidden-opacity');
9046
9154
 
9047
9155
  if( document.pointerLockElement )
9048
9156
  {
@@ -9056,8 +9164,6 @@ class Vector extends Widget {
9056
9164
  }
9057
9165
 
9058
9166
  vecinput.addEventListener( "mousedown", innerMouseDown );
9059
-
9060
- box.appendChild( vecinput );
9061
9167
  container.appendChild( box );
9062
9168
  }
9063
9169
 
@@ -11127,6 +11233,7 @@ class Panel {
11127
11233
  * @param {Object} options:
11128
11234
  * hideName: Don't use name as label [false]
11129
11235
  * float: Justify content (left, center, right) [center]
11236
+ * selected: Selected button by default (String|Array)
11130
11237
  * noSelection: Buttons can be clicked, but they are not selectable
11131
11238
  * toggle: Buttons can be toggled insted of selecting only one
11132
11239
  */
@@ -13409,7 +13516,7 @@ class AssetView {
13409
13516
 
13410
13517
  if( !this.skipBrowser )
13411
13518
  {
13412
- [left, right] = area.split({ type: "horizontal", sizes: ["15%", "85%"]});
13519
+ [ left, right ] = area.split({ type: "horizontal", sizes: ["15%", "85%"]});
13413
13520
  contentArea = right;
13414
13521
 
13415
13522
  left.setLimitBox( 210, 0 );
@@ -13619,7 +13726,7 @@ class AssetView {
13619
13726
  }
13620
13727
  else
13621
13728
  {
13622
- this.rightPanel = area.addPanel({ className: 'lexassetcontentpanel' });
13729
+ this.rightPanel = area.addPanel({ className: 'lexassetcontentpanel flex flex-col overflow-hidden' });
13623
13730
  }
13624
13731
 
13625
13732
  const on_sort = ( value, event ) => {