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

Feature: show react-svg-pan-zoom toolbar #22

Open
hichemfantar opened this issue Apr 19, 2022 · 0 comments
Open

Feature: show react-svg-pan-zoom toolbar #22

hichemfantar opened this issue Apr 19, 2022 · 0 comments

Comments

@hichemfantar
Copy link

hichemfantar commented Apr 19, 2022

How can I bring back the toolbar already available in react-svg-pan-zoom library?

image

Cause: svg-viewer.jsx ( customToolbar={() => <></>} )
Wouldn't it be better to make the custom Toolbar optional?

  return (
    <ReactSVGPanZoom
      detectAutoPan={false}
      ref={Viewer}
      scaleFactor={scaleFactor}
      scaleFactorMax={scaleFactorMax}
      scaleFactorMin={scaleFactorMin}
      width={Math.min(width, bracketWidth)}
      height={Math.min(height, bracketHeight)}
      tool={tool}
      onChangeTool={setTool}
      value={value}
      onChangeValue={setValue}
      onZoom={lockToBoundaries}
      onPan={lockToBoundaries}
      miniatureProps={{ position: 'right' }}
      customToolbar={() => <></>}
      {...rest}
    >
      {children}
    </ReactSVGPanZoom>
  );
hichemfantar added a commit to hichemfantar/react-tournament-brackets that referenced this issue Jul 8, 2022
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

1 participant