(editor) Actions on multiple groups

You can now select groups, move, copy, delete them easily

Closes #830, closes #1092
This commit is contained in:
Baptiste Arnaud
2024-01-23 10:31:31 +01:00
parent 8ec3916471
commit 2c20e96a81
32 changed files with 1043 additions and 282 deletions

View File

@@ -0,0 +1,28 @@
import { Box } from '@chakra-ui/react'
import { Coordinates } from '../types'
import { headerHeight } from '@/features/editor/constants'
type Props = {
origin: Coordinates
dimension: {
width: number
height: number
}
}
export const SelectBox = ({ origin, dimension }: Props) => (
<Box
pos="absolute"
rounded="md"
borderWidth={1}
borderColor="blue.200"
bgColor="rgba(0, 66, 218, 0.1)"
style={{
left: origin.x,
top: origin.y - headerHeight,
width: dimension.width,
height: dimension.height,
zIndex: 1000,
}}
/>
)