Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zoom to coords #127

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Add zoom to coords #127

merged 3 commits into from
Dec 3, 2024

Conversation

louis-openspace
Copy link

Need a zoom to coords for OS

)
return false;
// Just exposing _zoomToLocation
this._zoomToLocation(x, y, newZoomLevel);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need a return true here

* Sets zoom relative to a "zoom subject" which is the relative coordinates
* of the view
*/
zoomToZoomSubject(x: number, y: number, newZoomLevel: number) {
Copy link
Collaborator

@thomasttvo thomasttvo Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just build this into zoomTo.
To prevent API change you can do zoomTo(newZoomLevel: number, x?: number, y?: number)

Copy link
Collaborator

@thomasttvo thomasttvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some minor comments

* Sets zoom relative to a "zoom subject" which is the relative coordinates
* of the view
*/
zoomToZoomSubject(x: number, y: number, newZoomLevel: number) {
Copy link
Collaborator

@thomasttvo thomasttvo Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, fyi zoomSubject is a term used in this library to refer to the whole transformed view all the way below, rather than a particular coordinate.

@louis-openspace louis-openspace merged commit adf1a54 into master Dec 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants