Fr/anchored subgrid indicator (#4303)

* fix(frontend): fix anchored indicator for subgrids

* fix(frontend): fix anchored indicator for subgrids
This commit is contained in:
Faton Ramadani
2024-08-29 20:05:31 +02:00
committed by GitHub
parent 85486c3e22
commit 9d50235fe9
3 changed files with 6 additions and 4 deletions
@@ -108,6 +108,7 @@
selectedIds={$selectedComponent}
let:dataItem
let:hidden
let:overlapped
cols={columnConfiguration}
scroller={container}
parentWidth={$parentWidth - 17}
@@ -125,6 +126,7 @@
<GridEditorMenu id={dataItem.id}>
<Component
{hidden}
{overlapped}
fullHeight={dataItem?.[$breakpoint === 'sm' ? 3 : 12]?.fullHeight}
render={visible}
component={dataItem.data}
@@ -94,12 +94,12 @@
getContext<AppViewerContext>('AppViewerContext')
const editorContext = getContext<AppEditorContext>('AppEditorContext')
const componentActive = editorContext?.componentActive
const movingcomponents = editorContext?.movingcomponents
$: ismoving =
movingcomponents != undefined && $mode == 'dnd' && $movingcomponents?.includes(component.id)
const componentActive = editorContext?.componentActive
let initializing: boolean | undefined = undefined
let errorHandledByComponent: boolean = false
let componentContainerHeight: number = 0
@@ -139,7 +139,7 @@
hidden && $mode === 'preview' ? 'hidden' : ''
)}
>
{#if locked && componentActive && $componentActive && $selectedComponent?.[0] !== component.id}
{#if locked && componentActive && $componentActive && $selectedComponent?.[0] !== component.id && overlapped}
<div
class={twMerge(
'absolute inset-0 bg-locked center-center flex-col z-50',
@@ -136,7 +136,7 @@ export function moveItem(active, items, cols) {
if (fixed) {
return {
items: items,
overlap: true
overlap: closeBlocks.length > 0
}
}