Skip to content

Inaccurate Orthographic View Controller Smooth ScrollZoom #5779

@mcost45

Description

@mcost45

Description

When using an orthographic view with a controller and scrollZoom smooth enabled, zooming does not accurately follow the pointer position. A single smooth zoom appears to 'curve' in or out to the next zoom level rather than zooming in a straight line. Zooming in and out multiple times with a constant pointer position will result in view content slowly drifting off the screen - smooth zooming shifts the coordinate under the pointer. The further the pointer is from the centre of the view, the more prominent this effect will be. With smooth zooming disabled, zooming accurately zooms on the pointer position as expected.

I assume this issue stems from OrthographicController using OrbitState in super()? OrbitViews also exhibit the exact same behaviour with smooth scrolling enabled.

Expected Behavior

Smooth zooming should follow mouse position - i.e. if the pointer remains in a constant position, the coordinate the pointer is over should also remain constant regardless of zoom level.

Repro Steps

OrthographicView example modified to enable smooth zoom:
https://codepen.io/mttrx/pen/NWpNwEZ
To see the effect most prominently, zoom in and out near the edge of the view.

Environment

  • Framework Version: 8.4.16
  • Browser Version: Chrome 90.0.4430.212
  • OS: Windows Version 10.0.19042

Logs

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions