To get REAL center in graph.zoom you need to use window.innerWidth and window.innerHeight NOT graph.getViewPortCenterPoint() #5091
Labels
good first issue
stale
Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Describe the bug
To get REAL center in graph.zoom you need to use window.innerWidth and window.innerHeight NOT graph.getViewPortCenterPoint()
graph.zoom(1.2, graph.getViewPortCenterPoint()) - WRONG
This call will zoom with move with offset
graph.zoom(1.2, {x: window.innerWidth / 2, y: window.innerHeight / 2} ) - CORRECT
This call will zoom right at the center.
Please state this fact in the documentation
Your Example Website or App
Steps to Reproduce the Bug or Issue
Expected behavior
As a user, I expected that graph.zoom(1.2, graph.getViewPortCenterPoint()) will zoom at the center of the camera view but i am seeing strange offset
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: