Skip to content

Commit

Permalink
feat: adjust rotation handle size
Browse files Browse the repository at this point in the history
  • Loading branch information
F-star committed Jan 25, 2024
1 parent 9b661b5 commit f736e25
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/core/src/control_handle_manager/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ export const createTransformHandles = (params: {
});

/************************* rotation handle **********************/
const rotationHandleSize = params.size * 2.5;
const nwRotation = new ControlHandle({
graph: new Rect({
objectName: 'nwRotation',
...getDefaultAttrs(),
width: params.size * 2,
height: params.size * 2,
width: rotationHandleSize,
height: rotationHandleSize,
visible: false,
}),
type: 'nwRotation',
Expand All @@ -165,8 +166,8 @@ export const createTransformHandles = (params: {
graph: new Rect({
objectName: 'neRotation',
...getDefaultAttrs(),
width: params.size * 2,
height: params.size * 2,
width: rotationHandleSize,
height: rotationHandleSize,
visible: false,
}),
type: 'neRotation',
Expand All @@ -177,8 +178,8 @@ export const createTransformHandles = (params: {
graph: new Rect({
objectName: 'seRotation',
...getDefaultAttrs(),
width: params.size * 2,
height: params.size * 2,
width: rotationHandleSize,
height: rotationHandleSize,
visible: false,
}),
type: 'seRotation',
Expand All @@ -189,8 +190,8 @@ export const createTransformHandles = (params: {
graph: new Rect({
objectName: 'swRotation',
...getDefaultAttrs(),
width: params.size * 2,
height: params.size * 2,
width: rotationHandleSize,
height: rotationHandleSize,
visible: false,
}),
type: 'swRotation',
Expand Down

0 comments on commit f736e25

Please sign in to comment.