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:
parent
3129bae6e2
commit
336cbc7158
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ export type ResizeBoxOptions = Partial<{
|
||||||
maxHeight: number
|
maxHeight: number
|
||||||
}>
|
}>
|
||||||
|
|
||||||
export const resizeBox = (
|
export function resizeBox(
|
||||||
shape: TLBaseBoxShape,
|
shape: TLBaseBoxShape,
|
||||||
info: {
|
info: {
|
||||||
newPoint: Vec2dModel
|
newPoint: Vec2dModel
|
||||||
|
@ -23,7 +23,7 @@ export const resizeBox = (
|
||||||
initialShape: TLBaseBoxShape
|
initialShape: TLBaseBoxShape
|
||||||
},
|
},
|
||||||
opts = {} as ResizeBoxOptions
|
opts = {} as ResizeBoxOptions
|
||||||
) => {
|
) {
|
||||||
const { newPoint, handle, scaleX, scaleY } = info
|
const { newPoint, handle, scaleX, scaleY } = info
|
||||||
const { minWidth = 1, maxWidth = Infinity, minHeight = 1, maxHeight = Infinity } = opts
|
const { minWidth = 1, maxWidth = Infinity, minHeight = 1, maxHeight = Infinity } = opts
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue