Skip to content

[Bug]: The padding of PaperScroller's "scrollWhileDragging" is measuring incorrectly the position of the cursor (part 2) #2306

@alexandernst

Description

@alexandernst

What happened?

This is an issue closely related to #1779 (which I opened last year), hence I'll use the code that I provided there.

I found out that if the paperscroller is zoomed, the padding that is used to trigger the scrollWhileDragging feature is wrongly calculated.

If I set the zoom to 0, the scrolling starts once the cursor surpasses the red border:

Grabacion.de.pantalla.2023-08-20.a.las.12.41.59.mov

But if I set the zoom to '1.5', the padding is wrongly calculated and the scrolling starts way before the cursor has reached the red border:

Grabacion.de.pantalla.2023-08-20.a.las.12.43.31.mov

Code with the poc: https://codesandbox.io/s/rappid-paperscroller-bug-zoom-z4zdqf

Version

3.7.5

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

What operating system are you seeing the problem on?

Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementjointjs+The paid commercial extension to the JointJS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions