Make resizeBox a regular function (#1610)

This PR changes `resizeBox` to be a regular function rather than an
arrow function.

### Change Type

- [x] `minor` — New feature

### Release Notes

- [editor] Change `resizeBox` to be a regular function.
This commit is contained in:
Steve Ruiz 2023-06-18 10:47:00 +01:00 committed by GitHub
parent 3129bae6e2
commit 336cbc7158
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ export type ResizeBoxOptions = Partial<{
maxHeight: number
}>
export const resizeBox = (
export function resizeBox(
shape: TLBaseBoxShape,
info: {
newPoint: Vec2dModel
@ -23,7 +23,7 @@ export const resizeBox = (
initialShape: TLBaseBoxShape
},
opts = {} as ResizeBoxOptions
) => {
) {
const { newPoint, handle, scaleX, scaleY } = info
const { minWidth = 1, maxWidth = Infinity, minHeight = 1, maxHeight = Infinity } = opts