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

Ability to control alignment in fitSelection() and "zoom in" tool #225

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tblaette
Copy link

@tblaette tblaette commented Aug 1, 2024

Added ability to control alignment in fitSelection() and "zoom in" tool:

  • enabled to specify SVGAlignX and SVGAlignY parameters in fitSelection():
    • fitSelection(value, selectionSVGPointX, selectionSVGPointY, selectionWidth, selectionHeight, SVGAlignX=ALIGN_LEFT, SVGAlignY=ALIGN_TOP)
    • refactored fitToViewer() to call the new fitSelection() function internally
  • made the zoom in tool to respect the toolbarProps.SVGAlignX/Y props. If for instance toolbarProps.SVGAlignX is set to center, drawing a rectangle to zoom in will now center the selected area in the view.
  • updated the documentation to reflect the changes above

Note: if you would like to have typescript support in your project as well, see PR #226

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.

1 participant