Skip to content

Hook into updateMeasuredTemplate for autotargeting to support script based movement of templates #106

@KayelGee

Description

@KayelGee

Currently autotargeting only works if a template is moved by the user as getTargets is only called in _onDragLeftMove and activatePreviewListeners if I've looked correctly.
When a template gets moved by a script/module(like token attacher) these functions don't get called.
This can be solved by hooking into updateMeasuredTemplate and call getTargets if the update data contains x,y or rotation.
This might not be desirable for every user so it might make sense to add an option to enable or disable this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions