Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
ruggi committed Jul 10, 2024
1 parent 2dc427e commit cebef9e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions editor/src/components/canvas/controls/grid-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ export interface GridResizingControlProps {
dimensionIndex: number
axis: 'row' | 'column'
containingFrame: CanvasRectangle
workingPrefix: number
fromPropsAxisValues: GridAutoOrTemplateBase | null
padding: number | null
}
Expand Down Expand Up @@ -281,8 +280,6 @@ export const GridResizing = React.memo((props: GridResizingProps) => {
}
switch (props.axisValues.type) {
case 'DIMENSIONS':
let workingPrefix: number =
props.axis === 'column' ? props.containingFrame.x : props.containingFrame.y
const size = GRID_RESIZE_HANDLE_SIZE / canvasScale
return (
<div
Expand Down Expand Up @@ -314,25 +311,13 @@ export const GridResizing = React.memo((props: GridResizingProps) => {
}}
>
{props.axisValues.dimensions.flatMap((dimension, dimensionIndex) => {
// Assumes pixels currently.
workingPrefix += dimension.value
if (dimensionIndex === 0) {
// Shift by half the gap initially...
workingPrefix += (props.gap ?? 0) / 2
} else {
// ...Then by the full gap, as it would be half from the prior entry
// and half from the current one.
workingPrefix += props.gap ?? 0
}

return (
<GridResizingControl
dimensionIndex={dimensionIndex}
dimension={dimension}
fromPropsAxisValues={props.fromPropsAxisValues}
axis={props.axis}
containingFrame={props.containingFrame}
workingPrefix={workingPrefix}
padding={
props.padding == null
? 0
Expand Down

0 comments on commit cebef9e

Please sign in to comment.