-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
feature: align cover svg to viewer #167
Conversation
It fixes #29 |
@chrvadala hey, any chances this will be merged soon? :) |
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.
Hi, thanks for your contributions.
I added few feedbacks inline; moreover, can you provide some unit tests?
Finally, let me to suggest you to align your PR with the add-test branch https://github.com/chrvadala/react-svg-pan-zoom/tree/add-tests, because I'll merge it in the next few days
quick update: add-tests is merged! you can sync your branch with master |
Ok, thanks, I'll address all the issues after the weekend |
@chrvadala I added some unit tests - for two scenarios where rect > viewport and the opposite. Both cases seem to be working fine. I also removed the package-lock.json and removed the blank lines. |
Released with version 3.8.0 |
These changes allow to call:
viewer.fitToViewer(ALIGN_COVER, ALIGN_COVER)
so that the svg will always take the whole viewport and match the viewport by the short edge.Please review and let me know if there is something else I must add