-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add zoom to coords #127
Conversation
) | ||
return false; | ||
// Just exposing _zoomToLocation | ||
this._zoomToLocation(x, y, newZoomLevel); |
There was a problem hiding this comment.
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
src/ReactNativeZoomableView.tsx
Outdated
* Sets zoom relative to a "zoom subject" which is the relative coordinates | ||
* of the view | ||
*/ | ||
zoomToZoomSubject(x: number, y: number, newZoomLevel: number) { |
There was a problem hiding this comment.
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)
There was a problem hiding this 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
src/ReactNativeZoomableView.tsx
Outdated
* Sets zoom relative to a "zoom subject" which is the relative coordinates | ||
* of the view | ||
*/ | ||
zoomToZoomSubject(x: number, y: number, newZoomLevel: number) { |
There was a problem hiding this comment.
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.
Need a zoom to coords for OS