From b4558fc79eeca9334187017acdd65d4a0b50dbd0 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 8 Oct 2022 16:02:12 -0700 Subject: [PATCH] Add center footer option --- .../toolbar/toolbarConfigurationBuilder.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/toolbar/toolbarConfigurationBuilder.tsx b/packages/editor/src/components/toolbar/toolbarConfigurationBuilder.tsx index 0d7f9433..2982f2e5 100644 --- a/packages/editor/src/components/toolbar/toolbarConfigurationBuilder.tsx +++ b/packages/editor/src/components/toolbar/toolbarConfigurationBuilder.tsx @@ -10,6 +10,7 @@ import NoteOutlinedIcon from '@mui/icons-material/NoteOutlined'; import LinkOutlinedIcon from '@mui/icons-material/LinkOutlined'; import ZoomOutOutlinedIcon from '@mui/icons-material/ZoomOutOutlined'; import ZoomInOutlinedIcon from '@mui/icons-material/ZoomInOutlined'; +import CenterFocusStrongOutlinedIcon from '@mui/icons-material/CenterFocusStrongOutlined'; import SentimentSatisfiedAltIcon from '@mui/icons-material/SentimentSatisfiedAlt'; import UndoOutlinedIcon from '@mui/icons-material/UndoOutlined'; import RedoOutlinedIcon from '@mui/icons-material/RedoOutlined'; @@ -37,6 +38,7 @@ import ActionConfig from '../../classes/action/action-config'; import { SwitchValueDirection } from './ToolbarValueModelBuilder'; import NodePropertyValueModelBuilder from '../../classes/model/node-property-builder'; import Typography from '@mui/material/Typography'; +import { ToolbarActionType } from '.'; import KeyboardOutlined from '@mui/icons-material/KeyboardOutlined'; import Tooltip from '@mui/material/Tooltip'; import ColorPicker from '../action-widget/pane/color-picker'; @@ -48,8 +50,6 @@ import IconPicker from '../action-widget/pane/icon-picker'; import FontFamilySelector from '../action-widget/button/font-family-selector'; import Capability from '../../classes/action/capability'; -export type ToolbarActionType = 'export' | 'publish' | 'history' | 'print' | 'share' | 'info'; - /** * * @param designer designer to aply changes @@ -305,6 +305,13 @@ export function buildZoomToolbarConfiguration( if (!designer) return []; return [ + { + icon: , + tooltip: $msg('CENTER_POSITION'), + onClick: () => { + designer.zoomToFit(); + }, + }, { // zoom value candidate, neds to fixit render: () => (