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

Provide methods to pan w/out changing zoom level #12

Closed
lmonson opened this issue Jun 10, 2014 · 1 comment
Closed

Provide methods to pan w/out changing zoom level #12

lmonson opened this issue Jun 10, 2014 · 1 comment

Comments

@lmonson
Copy link
Contributor

lmonson commented Jun 10, 2014

I'm trying to implement my own pan controls from outside the directive. It doesn't appear that the directive exposes direct methods to pan -- the logic for a "pure pan" is embedded in mouse move event handler.

I would be very happy to provide a pull request -- but wanted to ensure I hadn't missed anything beforehand. I would augment as follows:

changeZoomLevel(newZoomLevel, clickPoint)
zoomIn(clickPoint)
zoomOut(clickPoint)
getViewPosition(modelPosition)
getModelPosition(viewPosition)
** panView(delta) // delta.x and/or delta.y

@mvindahl
Copy link
Owner

Hello lmonson,
That seems like a sensible and useful addition to the API. You are correct that the functionality does not currently exist; mainly because I designed the API as I went along and in response to the needs of a proprietary project which needed the pan zoom functionality in the first place.
I'll review the pull request ASAP. Once again thanks for your contribution :-)
Cheers,
/Martin

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

No branches or pull requests

2 participants