Skip to content

Commit

Permalink
use isGridCell
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrmendy committed Jul 9, 2024
1 parent c471b7a commit 6cd52af
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ export const gridResizeElementStrategy: CanvasStrategyFactory = (
}

const selectedElement = selectedElements[0]
const isElementInsideGrid = MetadataUtils.isGridLayoutedContainer(
MetadataUtils.findElementByElementPath(
canvasState.startingMetadata,
EP.parentPath(selectedElement),
),
const isElementInsideGrid = MetadataUtils.isGridCell(
canvasState.startingMetadata,
selectedElement,
)
if (!isElementInsideGrid) {
return null
Expand Down

0 comments on commit 6cd52af

Please sign in to comment.