diff --git a/editor/src/components/canvas/canvas-component-entry.tsx b/editor/src/components/canvas/canvas-component-entry.tsx index 52e1365dea3f..3643767b3f9a 100644 --- a/editor/src/components/canvas/canvas-component-entry.tsx +++ b/editor/src/components/canvas/canvas-component-entry.tsx @@ -83,7 +83,7 @@ const CanvasComponentEntryInner = React.memo((props: CanvasComponentEntryProps) clearRuntimeErrors() }, [clearRuntimeErrors]) - const containerRef = useApplyCanvasOffsetToStyle(true) + const containerRef = useApplyCanvasOffsetToStyle(true, 'xy') return ( <> diff --git a/editor/src/components/canvas/canvas-strategies/strategies/resize-grid-strategy.ts b/editor/src/components/canvas/canvas-strategies/strategies/resize-grid-strategy.ts index ae80e5b24252..ccf88f8ddbd5 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/resize-grid-strategy.ts +++ b/editor/src/components/canvas/canvas-strategies/strategies/resize-grid-strategy.ts @@ -8,10 +8,7 @@ import { MetadataUtils } from '../../../../core/model/element-metadata-utils' import * as EP from '../../../../core/shared/element-path' import * as PP from '../../../../core/shared/property-path' import { setProperty } from '../../commands/set-property-command' -import { - controlsForGridPlaceholders, - GridRowColumnResizingControls, -} from '../../controls/grid-controls' +import { controlsForGridPlaceholders } from '../../controls/grid-controls' import type { CanvasStrategyFactory } from '../canvas-strategies' import { onlyFitWhenDraggingThisControl } from '../canvas-strategies' import type { InteractionCanvasState } from '../canvas-strategy-types' @@ -37,6 +34,7 @@ import type { GridAutoOrTemplateBase } from '../../../../core/shared/element-tem import { expandGridDimensions, replaceGridTemplateDimensionAtIndex } from './grid-helpers' import { setCursorCommand } from '../../commands/set-cursor-command' import { CSSCursor } from '../../canvas-types' +import { GridRowColumnResizingControls } from '../../controls/grid-controls-ruler' export const resizeGridStrategy: CanvasStrategyFactory = ( canvasState: InteractionCanvasState, diff --git a/editor/src/components/canvas/canvas-strategies/strategies/set-grid-gap-strategy.tsx b/editor/src/components/canvas/canvas-strategies/strategies/set-grid-gap-strategy.tsx index 484d19455ef5..f2be4ea58db0 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/set-grid-gap-strategy.tsx +++ b/editor/src/components/canvas/canvas-strategies/strategies/set-grid-gap-strategy.tsx @@ -115,6 +115,7 @@ export const setGridGapStrategy: CanvasStrategyFactory = ( }, key: 'grid-gap-resize-control', show: 'visible-except-when-other-strategy-is-active', + priority: 'top', }) const maybeIndicatorProps = gridGapValueIndicatorProps(interactionSession, gridGap) diff --git a/editor/src/components/canvas/controls/canvas-offset-wrapper.tsx b/editor/src/components/canvas/controls/canvas-offset-wrapper.tsx index a4fb60951eb6..d021cd5ca3c3 100644 --- a/editor/src/components/canvas/controls/canvas-offset-wrapper.tsx +++ b/editor/src/components/canvas/controls/canvas-offset-wrapper.tsx @@ -10,8 +10,11 @@ import { isFollowMode } from '../../editor/editor-modes' import { liveblocksThrottle } from '../../../../liveblocks.config' export const CanvasOffsetWrapper = React.memo( - (props: { children?: React.ReactNode; setScaleToo?: boolean }) => { - const elementRef = useApplyCanvasOffsetToStyle(props.setScaleToo ?? false) + (props: { children?: React.ReactNode; setScaleToo?: boolean; limitAxis?: 'x' | 'y' | 'xy' }) => { + const elementRef = useApplyCanvasOffsetToStyle( + props.setScaleToo ?? false, + props.limitAxis ?? 'xy', + ) return (