feat: 3x3 grid in crop box

This commit is contained in:
httpjamesm 2024-01-07 00:19:02 -05:00
parent 53321980ef
commit dcb55d331e
No known key found for this signature in database

View file

@ -623,9 +623,7 @@ const ImageEditorOverlay = (props: IProps) => {
<div
style={{
display:
currentTab === 'crop'
? 'inline-block'
: 'none',
currentTab === 'crop' ? 'grid' : 'none',
position: 'absolute',
left: cropBox.x + 'px',
top: cropBox.y + 'px',
@ -633,8 +631,21 @@ const ImageEditorOverlay = (props: IProps) => {
height: cropBox.height + 'px',
backgroundColor: 'rgba(0,0,0,0.5)',
border: '1px solid white',
gridTemplateColumns: '1fr 1fr 1fr',
gridTemplateRows: '1fr 1fr 1fr',
gap: '0px',
}}
ref={cropBoxRef}>
{Array.from({ length: 9 }).map((_, index) => (
<div
key={index}
style={{
border: '1px solid white',
boxSizing: 'border-box',
pointerEvents: 'none',
}}></div>
))}
<div
style={seHandleStyle}
onMouseDown={(e) => {