|
@@ -2,7 +2,7 @@ import React from "react";
|
|
import { Action } from "./types";
|
|
import { Action } from "./types";
|
|
import { ColorPicker } from "../components/ColorPicker";
|
|
import { ColorPicker } from "../components/ColorPicker";
|
|
import { getDefaultAppState } from "../appState";
|
|
import { getDefaultAppState } from "../appState";
|
|
-import { trash, zoomIn, zoomOut } from "../components/icons";
|
|
|
|
|
|
+import { trash, zoomIn, zoomOut, resetZoom } from "../components/icons";
|
|
import { ToolButton } from "../components/ToolButton";
|
|
import { ToolButton } from "../components/ToolButton";
|
|
import { t } from "../i18n";
|
|
import { t } from "../i18n";
|
|
import { getNormalizedZoom } from "../scene";
|
|
import { getNormalizedZoom } from "../scene";
|
|
@@ -131,6 +131,17 @@ export const actionResetZoom: Action = {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ PanelComponent: ({ updateData }) => (
|
|
|
|
+ <ToolButton
|
|
|
|
+ type="button"
|
|
|
|
+ icon={resetZoom}
|
|
|
|
+ title={t("buttons.resetZoom")}
|
|
|
|
+ aria-label={t("buttons.resetZoom")}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ updateData(null);
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ ),
|
|
keyTest: event =>
|
|
keyTest: event =>
|
|
(event.code === KEY_CODES.ZERO || event.code === KEY_CODES.NUM_ZERO) &&
|
|
(event.code === KEY_CODES.ZERO || event.code === KEY_CODES.NUM_ZERO) &&
|
|
(event[KEYS.META] || event.shiftKey),
|
|
(event[KEYS.META] || event.shiftKey),
|