Skip to content

Don't transform to local coordinates when mouse input is already captured #42

@tlvenn

Description

@tlvenn

While i was debugging an issue with mouse input, I noticed that globalToLocal(input.stagePosition, input.localPosition); is always called even though it is only needed for the hitTouch which is only happening when the input has not been captured already.

https://github.com/roipeker/graphx/blob/master/lib/src/display/display_object.dart#L113

We should avoid this op in that case given this op will be called for each sprite / shape in your entire scene.

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