Skip to content

How to keep the Transformer active anchor stable during a single drag event? #1967

@fallingleaflun

Description

@fallingleaflun

Hi,

I'm using Konva and have encountered an issue with the Transformer component. When dragging a transformer anchor, the active anchor can change during the drag event, which is not the desired behavior. I would like to stop resizing when the selected anchor moves to the edge (e.g., stop resizing when the top-left anchor is dragged beyond the right edge or bottom edge). I tried to override the anchorDragBoundFunc and use transformer.getActiveAnchor to restrict the selected anchor, but it turns out that ActiveAnchor changes automatically. How can I achieve this goal?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions