@@ -22,8 +22,8 @@ import { ElementExt } from "@lumino/domutils";
2222import {
2323 empty ,
2424 // IIterator,
25- each ,
26- chain ,
25+ // each,
26+ // chain,
2727 ArrayExt ,
2828 reduce ,
2929} from "@lumino/algorithm" ;
@@ -59,7 +59,7 @@ export class ImprovedBoxLayout extends BoxLayout {
5959 // this.attachWidget( widget);
6060 // });
6161
62- each ( this . handles , ( handle ) => {
62+ this . handles . forEach ( ( handle ) => {
6363 this . parent ! . node . appendChild ( handle ) ;
6464 } ) ;
6565
@@ -129,12 +129,12 @@ export class ImprovedBoxLayout extends BoxLayout {
129129 * sync visibility and direction of the handles
130130 */
131131 syncHandles ( ) : void {
132- each ( this . handles , ( handle , i ) => {
132+ this . handles . forEach ( ( handle , i ) => {
133133 handle . setAttribute ( "data-orientation" , this . orientation ) ;
134134 if ( i === this . handles . length - 1 ) {
135- handle . classList . add ( "p -mod-hidden" ) ;
135+ handle . classList . add ( "lm -mod-hidden" ) ;
136136 } else {
137- handle . classList . remove ( "p -mod-hidden" ) ;
137+ handle . classList . remove ( "lm -mod-hidden" ) ;
138138 }
139139 } ) ;
140140 }
@@ -168,8 +168,9 @@ export class ImprovedBoxLayout extends BoxLayout {
168168 // De-normalize the sizes if needed.
169169 if ( this . normalized ) {
170170 crdebug ( "IBL update(): need to de-normalize sizers" ) ;
171+
171172 // @ts -expect-error TS2341: _sizers is private
172- each ( this . _sizers , ( sizer : BoxSizer , i ) => {
173+ this . _sizers . forEach ( ( sizer : BoxSizer , i ) => {
173174 // @ts -ignore debugging statement
174175 crdebug (
175176 `sizer ${ i } was ${ sizer . sizeHint } before, ${
@@ -275,7 +276,7 @@ export class ImprovedBoxLayout extends BoxLayout {
275276 */
276277 moveHandle ( handle : HTMLDivElement , offsetX : number , offsetY : number ) : void {
277278 // crdebug("IBL: moveHandle", handle, offsetX, offsetY);
278- if ( handle . classList . contains ( "p -mod-hidden" ) ) {
279+ if ( handle . classList . contains ( "lm -mod-hidden" ) ) {
279280 crdebug ( "Trying to move a hidden handle???" ) ;
280281 return ;
281282 }
@@ -332,7 +333,7 @@ export class ImprovedBoxLayout extends BoxLayout {
332333 holdSizes ( ) : void {
333334 // crdebug("IBL: holdSizes()");
334335 // @ts -expect-error TS2341: is private
335- each ( this . _sizers , ( sizer : BoxSizer ) => {
336+ this . _sizers . forEach ( ( sizer : BoxSizer ) => {
336337 sizer . sizeHint = sizer . size ;
337338 } ) ;
338339 }
@@ -352,12 +353,12 @@ export class ImprovedBoxLayout extends BoxLayout {
352353 // normalize based on sum
353354 if ( sum === 0 ) {
354355 // @ts -expect-error TS2341: is private
355- each ( this . _sizers , ( sizer : BoxSizer ) => {
356+ this . _sizers . forEach ( ( sizer : BoxSizer ) => {
356357 sizer . size = sizer . sizeHint = 1 / n ;
357358 } ) ;
358359 } else {
359360 // @ts -expect-error TS2341: is private
360- each ( this . _sizers , ( sizer : BoxSizer ) => {
361+ this . _sizers . forEach ( ( sizer : BoxSizer ) => {
361362 sizer . size = sizer . sizeHint /= sum ;
362363 } ) ;
363364 }
@@ -396,11 +397,11 @@ export class ImprovedBoxLayout extends BoxLayout {
396397 let sum = reduce ( sizes , ( v , size : number ) => v + size , 0 ) ;
397398
398399 if ( sum === 0 ) {
399- each ( sizes , ( size , i ) => {
400+ sizes . forEach ( ( size , i ) => {
400401 sizes [ i ] = 1 / n ;
401402 } ) ;
402403 } else {
403- each ( sizes , ( size , i ) => {
404+ sizes . forEach ( ( size , i ) => {
404405 sizes [ i ] = size / sum ;
405406 } ) ;
406407 }
@@ -418,11 +419,11 @@ export class ImprovedBoxLayout extends BoxLayout {
418419 let sum = reduce ( sizes , ( v , size ) => v + size , 0 ) ;
419420
420421 if ( sum === 0 ) {
421- each ( sizes , ( size , i ) => {
422+ sizes . forEach ( ( size , i ) => {
422423 sizes [ i ] = 1 / n ;
423424 } ) ;
424425 } else {
425- each ( sizes , ( size , i ) => {
426+ sizes . forEach ( ( size , i ) => {
426427 sizes [ i ] = size / sum ;
427428 } ) ;
428429 }
0 commit comments