fix: do not toggle isAutoResizing on resizing

This commit is contained in:
Peng Xiao
2022-08-24 16:00:36 +08:00
parent f6a70df284
commit 68dcef4e4f
3 changed files with 3 additions and 5 deletions

View File

@@ -287,6 +287,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
if (this.props.isAutoResizing) {
height = this.getAutoResizeHeight() ?? height
}
return this.update({
point: [bounds.minX, bounds.minY],
size: [Math.max(1, bounds.width), Math.max(1, height)],

View File

@@ -90,9 +90,6 @@ export class ResizingState<
})
)
selectedShapesArray.forEach(shape => {
shape.update({
isAutoResizing: false
})
shape.onResizeStart?.({ isSingle: this.isSingle })
})
}

View File

@@ -34,8 +34,8 @@ export const SelectionForeground = observer(function SelectionForeground<S exten
className="tl-bounds-fg"
width={Math.max(width, 1)}
height={Math.max(height, 1)}
rx={editing ? 4 : 0}
ry={editing ? 4 : 0}
rx={editing ? 8 : 0}
ry={editing ? 8 : 0}
pointerEvents="none"
/>
<EdgeHandle