[fix] handles updates (#1779)
This PR fixes the signals in the `HandlesWrapper` component. ### Change Type - [x] `patch` — Bug fix
This commit is contained in:
parent
af0f0f8d8b
commit
3a3f5b595e
1 changed files with 11 additions and 6 deletions
|
@ -190,15 +190,20 @@ function HandlesWrapper() {
|
|||
editor,
|
||||
])
|
||||
const isReadonly = useValue('isChangingStyle', () => editor.instanceState.isReadonly, [editor])
|
||||
const handles = useValue(
|
||||
'handles',
|
||||
() => (editor.onlySelectedShape ? editor.getHandles(editor.onlySelectedShape) : undefined),
|
||||
[editor]
|
||||
)
|
||||
const transform = useValue(
|
||||
'transform',
|
||||
() =>
|
||||
editor.onlySelectedShape ? editor.getPageTransform(editor.onlySelectedShape) : undefined,
|
||||
[editor]
|
||||
)
|
||||
|
||||
if (!Handles || !onlySelectedShape || isChangingStyle || isReadonly) return null
|
||||
|
||||
const handles = editor.getHandles(onlySelectedShape)
|
||||
|
||||
if (!handles) return null
|
||||
|
||||
const transform = editor.getPageTransform(onlySelectedShape)
|
||||
|
||||
if (!transform) return null
|
||||
|
||||
// Don't display a temporary handle if the distance between it and its neighbors is too small.
|
||||
|
|
Loading…
Reference in a new issue