Skip to content

Commit

Permalink
naming: setGridPropsCommands
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrmendy committed Jul 9, 2024
1 parent 6cd52af commit c22a06a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function gridPositionToValue(p: GridPosition | null | undefined): string
return p.numericalPosition
}

export function setGridProps(
export function setGridPropsCommands(
elementPath: ElementPath,
gridProps: Partial<GridElementProperties>,
): CanvasCommand[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
strategyApplicationResult,
} from '../canvas-strategy-types'
import type { InteractionSession } from '../interaction-state'
import { getGridCellUnderMouse, setGridProps } from './grid-helpers'
import { getGridCellUnderMouse, setGridPropsCommands } from './grid-helpers'

export const gridResizeElementStrategy: CanvasStrategyFactory = (
canvasState: InteractionCanvasState,
Expand Down Expand Up @@ -127,7 +127,7 @@ export const gridResizeElementStrategy: CanvasStrategyFactory = (
}

return strategyApplicationResult(
setGridProps(selectedElement, gridPropsWithDragOver(gridProps)),
setGridPropsCommands(selectedElement, gridPropsWithDragOver(gridProps)),
{
grid: { ...customState.grid, targetCell },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
strategyApplicationResult,
} from '../canvas-strategy-types'
import type { InteractionSession } from '../interaction-state'
import { setGridProps } from './grid-helpers'
import { setGridPropsCommands } from './grid-helpers'

export const rearrangeGridSwapStrategy: CanvasStrategyFactory = (
canvasState: InteractionCanvasState,
Expand Down Expand Up @@ -168,11 +168,11 @@ function swapChildrenCommands({
grabbedElement.elementPath,
GridPositioningProps.map((p) => create('style', p)),
),
...setGridProps(
...setGridPropsCommands(
grabbedElement.elementPath,
swapToElement.specialSizeMeasurements.elementGridProperties,
),
...setGridProps(
...setGridPropsCommands(
swapToElement.elementPath,
grabbedElement.specialSizeMeasurements.elementGridProperties,
),
Expand Down

0 comments on commit c22a06a

Please sign in to comment.