feat: add reset zoom button (#777)

* feat: add reset zoom button

Add zoom reset button.
Button is shown only when zoom scale is different from 1

* change reset zoom icon

* always show zoom reset

* fix typo
This commit is contained in:
Oren Me 2020-02-22 21:24:34 +02:00 committed by GitHub
parent 74add8661a
commit 07336bb168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 3 deletions

View file

@ -379,8 +379,9 @@ const LayerUI = React.memo(
return (
<Stack.Col gap={1}>
<Stack.Row gap={1} align="center">
{actionManager.renderAction("zoomIn")}
{actionManager.renderAction("zoomOut")}
{actionManager.renderAction(actionZoomIn.name)}
{actionManager.renderAction(actionZoomOut.name)}
{actionManager.renderAction(actionResetZoom.name)}
<div style={{ marginLeft: 4 }}>
{(appState.zoom * 100).toFixed(0)}%
</div>