fix(node-resizer): use autoscale prop to check if resize handle should scale (#2012)

* fix(node-resizer): use autoscale prop to check if resize handle should be scaled

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2026-01-05 13:35:07 +01:00
parent f330bee888
commit 75a2e052db
2 changed files with 10 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ const positionClassNames = computed(() => controlPosition.value.split('-'))
const controlStyle = toRef(() => (props.color ? { [StylingProperty[props.variant]]: props.color } : {}))
const isHandleControl = toRef(() => props.variant === ResizeControlVariant.Handle)
const scale = computed(() => (isHandleControl.value && props.autoScale ? `${Math.max(1 / viewport.value.zoom, 1)}` : undefined))
watchEffect((onCleanup) => {
if (!resizeControlRef.value || !props.nodeId) {
return
@@ -243,7 +247,7 @@ export default {
:class="[...positionClassNames, variant, noDragClassName]"
:style="{
...controlStyle,
scale: variant === ResizeControlVariant.Handle ? `${Math.max(1 / viewport.zoom, 1)}` : undefined,
scale,
}"
>
<slot />