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
Added ability to control alignment in
fitSelection()
and "zoom in" tool:SVGAlignX
andSVGAlignY
parameters infitSelection()
:fitSelection(value, selectionSVGPointX, selectionSVGPointY, selectionWidth, selectionHeight, SVGAlignX=ALIGN_LEFT, SVGAlignY=ALIGN_TOP)
fitToViewer()
to call the newfitSelection()
function internallyzoom in
tool to respect thetoolbarProps.SVGAlignX/Y
props. If for instancetoolbarProps.SVGAlignX
is set tocenter
, drawing a rectangle to zoom in will now center the selected area in the view.Note: if you would like to have typescript support in your project as well, see PR #226