|
@@ -21,6 +21,7 @@ export const SelectionForeground = observer(function SelectionForeground<S exten
|
|
|
const size = 8 / zoom
|
|
const size = 8 / zoom
|
|
|
const targetSize = 6 / zoom
|
|
const targetSize = 6 / zoom
|
|
|
const clonePadding = 30 / zoom
|
|
const clonePadding = 30 / zoom
|
|
|
|
|
+ const cloneHandleSize = size * 2
|
|
|
|
|
|
|
|
const canResize = shapes.length === 1 ? shapes[0].canResize : [true, true]
|
|
const canResize = shapes.length === 1 ? shapes[0].canResize : [true, true]
|
|
|
|
|
|
|
@@ -112,31 +113,24 @@ export const SelectionForeground = observer(function SelectionForeground<S exten
|
|
|
<CloneHandle
|
|
<CloneHandle
|
|
|
cx={- clonePadding}
|
|
cx={- clonePadding}
|
|
|
cy={height / 2}
|
|
cy={height / 2}
|
|
|
- size={size}
|
|
|
|
|
|
|
+ size={cloneHandleSize}
|
|
|
direction={TLCloneDirection.Left}
|
|
direction={TLCloneDirection.Left}
|
|
|
isHidden={!showCloneHandles}
|
|
isHidden={!showCloneHandles}
|
|
|
/>
|
|
/>
|
|
|
<CloneHandle
|
|
<CloneHandle
|
|
|
cx={width + clonePadding}
|
|
cx={width + clonePadding}
|
|
|
cy={height / 2}
|
|
cy={height / 2}
|
|
|
- size={size}
|
|
|
|
|
|
|
+ size={cloneHandleSize}
|
|
|
direction={TLCloneDirection.Right}
|
|
direction={TLCloneDirection.Right}
|
|
|
isHidden={!showCloneHandles}
|
|
isHidden={!showCloneHandles}
|
|
|
/>
|
|
/>
|
|
|
<CloneHandle
|
|
<CloneHandle
|
|
|
cx={width / 2}
|
|
cx={width / 2}
|
|
|
cy={height + clonePadding}
|
|
cy={height + clonePadding}
|
|
|
- size={size}
|
|
|
|
|
|
|
+ size={cloneHandleSize}
|
|
|
direction={TLCloneDirection.Bottom}
|
|
direction={TLCloneDirection.Bottom}
|
|
|
isHidden={!showCloneHandles}
|
|
isHidden={!showCloneHandles}
|
|
|
/>
|
|
/>
|
|
|
- <CloneHandle
|
|
|
|
|
- cx={width / 2}
|
|
|
|
|
- cy={- clonePadding}
|
|
|
|
|
- size={size}
|
|
|
|
|
- direction={TLCloneDirection.Top}
|
|
|
|
|
- isHidden={!showCloneHandles}
|
|
|
|
|
- />
|
|
|
|
|
{canResize?.every(r => r) && (
|
|
{canResize?.every(r => r) && (
|
|
|
<>
|
|
<>
|
|
|
<CornerHandle
|
|
<CornerHandle
|