fix(whiteboard): portal shape min size

This commit is contained in:
Peng Xiao
2022-10-25 09:44:04 +08:00
committed by Tienson Qin
parent 620da324f5
commit 8ea4c35fa0

View File

@@ -887,7 +887,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
validateProps = (props: Partial<LogseqPortalShapeProps>) => {
if (props.size !== undefined) {
const scale = levelToScale[this.props.scaleLevel ?? 'md']
props.size[0] = Math.max(props.size[0], 240 * scale)
props.size[0] = Math.max(props.size[0], 60 * scale)
props.size[1] = Math.max(props.size[1], HEADER_HEIGHT * scale)
}
return withClampedStyles(this, props)