Canvas: Implement minimum element size + center constraint UX (#49294)

This commit is contained in:
Nathan Marrs 2022-05-20 00:04:34 -07:00 committed by GitHub
parent 689f51599a
commit 646dcfccf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,9 @@ export class ElementState implements LayerElement {
const style: React.CSSProperties = {
position: 'absolute',
// Minimum element size is 10x10
minWidth: '10px',
minHeight: '10px',
};
const translate = ['0px', '0px'];

View File

@ -50,6 +50,7 @@ export const ConstraintSelectionBox = ({
height="75.000000pt"
viewBox="0 0 228.000000 228.000000"
preserveAspectRatio="xMidYMid meet"
style={{ marginBottom: '4.8px' }}
>
<g transform="translate(0.000000,228.000000) scale(0.100000,-0.100000)" fill="#000000" stroke="none">
<path