aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-06-14 10:18:15 +0200
committerlonkaars <loek@pipeframe.xyz>2021-06-14 10:18:15 +0200
commitc6a62404fa7a46e7eea1a832291ed3634ec68c90 (patch)
tree40823d5f25c686898a88f7e0c3e67c270c47f678 /components
parent7e23829cd491a893d601fe0d4e8e464e74f1d366 (diff)
selection working (with offsets) :tada:
Diffstat (limited to 'components')
-rw-r--r--components/selection.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/selection.tsx b/components/selection.tsx
index a039f79..bcc1656 100644
--- a/components/selection.tsx
+++ b/components/selection.tsx
@@ -69,12 +69,13 @@ export default function Selection(props: {
left?: slideTypes;
right?: slideTypes;
className?: string;
+ widthOffset?: number;
}) {
- var small = props.width < 24 || props.height < 24 || !props.left || !props.right;
+ var small = (props.width + props.widthOffset) < 24 || props.height < 24 || !props.left || !props.right;
return <div
className={'selection ' + props.className}
style={{
- width: `calc(var(--zoom) * ${props.frameWidth} * 1px + 12px)`,
+ width: `calc(var(--zoom) * ${props.frameWidth} * 1px + 12px + ${props.widthOffset} * 1px)`,
height: props.height,
'--corner-size': small ? '6px' : '12px',
} as CSSProperties}