fix app anchors

This commit is contained in:
Ruben Fiszel
2022-12-29 13:53:20 +01:00
parent 647b57b24e
commit f4c5de3d2b
2 changed files with 6 additions and 2 deletions
@@ -131,7 +131,10 @@
locked={isFixed(gridComponent)}
on:delete={() => removeGridElement(gridComponent.data)}
on:lock={() => {
gridComponent = toggleFixed(gridComponent)
let fComponent = $app.grid.find((c) => c.id === gridComponent.id)
if (fComponent) {
fComponent = toggleFixed(fComponent)
}
}}
/>
</div>
@@ -23,8 +23,9 @@ function disableDrag(component: GridItem): GridItem {
}
function toggleFixed(component: GridItem): GridItem {
const nValue = !component[gridColumns[0]].fixed
gridColumns.forEach((column: number) => {
component[column].fixed = !component[column].fixed
component[column].fixed = nValue
})
return component