Skip to content

Commit 323aff9

Browse files
committed
fix: make handles disappear at the right level of crampedness
1 parent b047357 commit 323aff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wrapShape.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ function wrapShape(WrappedComponent) {
374374
const RECOMMENDED_CORNER_SIZE = 10;
375375
const cornerSize = RECOMMENDED_CORNER_SIZE / scale;
376376
const hasSpaciousVertical =
377-
(sides.bottom - sides.top) * scale > cornerSize * 2;
377+
(sides.bottom - sides.top) * scale > RECOMMENDED_CORNER_SIZE * 2;
378378
const hasSpaciousHorizontal =
379-
(sides.right - sides.left) * scale > cornerSize * 2;
379+
(sides.right - sides.left) * scale > RECOMMENDED_CORNER_SIZE * 2;
380380
// Generate drag handles
381381
const handles = [
382382
hasSpaciousVertical && ['w', 'nw', 'ew-resize', 0, height / 2, 'y'],

0 commit comments

Comments
 (0)