File tree Expand file tree Collapse file tree
frontend/src/components/panels Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 insertDepth: number ;
3737 insertIndex: number | undefined ;
3838 highlightFolder: boolean ;
39+ highlightFolderIndex: number | undefined ;
3940 markerHeight: number ;
4041 };
4142
279280
280281 // Whether you are inserting into a folder and should show the folder outline
281282 let highlightFolder = false ;
283+ let highlightFolderIndex: number | undefined = undefined ;
282284
283285 let markerHeight = 0 ;
284286 const layerPanel = document .querySelector (" [data-layer-panel]" ); // Selects the element with the data-layer-panel attribute
305307 insertDepth = listing .depth ;
306308 insertIndex = 0 ;
307309 highlightFolder = true ;
310+ highlightFolderIndex = parseInt (indexAttribute , 10 );
308311 } else {
309312 insertParentId = listing .parentId ;
310313 insertDepth = listing .depth - 1 ;
342345 insertDepth ,
343346 insertIndex ,
344347 highlightFolder ,
348+ highlightFolderIndex ,
345349 markerHeight ,
346350 };
347351 }
582586 " ancestor-of-selected" : listing .ancestorOfSelected ,
583587 " descendant-of-selected" : listing .entry .descendantOfSelected ,
584588 " selected-but-not-in-selected-network" : selected && ! listing .entry .inSelectedNetwork ,
585- " insert-folder" : (draggingData ?.highlightFolder || false ) && draggingData ?.insertParentId === listing . entry . id ,
589+ " insert-folder" : (draggingData ?.highlightFolder || false ) && draggingData ?.highlightFolderIndex === index ,
586590 }}
587591 styles ={{ " --layer-indent-levels" : ` ${listing .depth - 1 } ` }}
588592 data-layer
760764 background : rgba (var (--color-4-dimgray-rgb ), 0.5 );
761765 }
762766
763- & .insert-folder {
764- outline : 3px solid var (--color-e-nearwhite );
765- outline-offset : -3px ;
767+ & .insert-folder ::after {
768+ content : " " ;
769+ position : absolute ;
770+ inset : 0 ;
771+ border : 3px solid var (--color-e-nearwhite );
772+ border-radius : 2px ;
773+ pointer-events : none ;
766774 }
767775
768776 .expand-arrow {
You can’t perform that action at this time.
0 commit comments