Skip to content

Continuously zooming and panning with the mouse causes panning to be interrupted. #3

@cj909

Description

@cj909

As the title says, after an interruption, panning will no longer be usable, only zooming is functioning as normal.

Through debugging, I found that in the PinchableScrollRect.OnDrag, OnBeginDrag, and OnEndDrag methods, the code block if (eventData.used) return; was causing an early return.
I commented out this code, which resolved the issue, but I'm not sure if this fix is appropriate.

public override void OnDrag(PointerEventData eventData) {
    // if (eventData.used) return;  // Commented out this line
    base.OnDrag(eventData);
}

public override void OnBeginDrag(PointerEventData eventData) {
    // if (eventData.used) return;  // Commented out this line
    // Single touch behaviour
    base.OnBeginDrag(eventData);
}

public override void OnEndDrag(PointerEventData eventData) {
    // if (eventData.used) return;  // Commented out this line
    // Single touch behaviour
    base.OnEndDrag(eventData);
}

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