From 77e41ef6c32db2d01dec732874afa4a7ecbd898a Mon Sep 17 00:00:00 2001 From: Danis Date: Wed, 27 Aug 2025 18:43:51 +0400 Subject: [PATCH] added reset background btn --- apps/presentationeditor/mobile/locale/en.json | 2 ++ .../mobile/src/controller/edit/EditSlide.jsx | 14 ++++++++++++++ .../mobile/src/view/edit/EditSlide.jsx | 7 +++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 55160c570d..5b7c411214 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -466,6 +466,8 @@ "textSec": "s", "textSelectObjectToEdit": "Select object to edit", "textSendToBackground": "Send to Background", + "textBackground": "Background", + "textResetBackground": "Reset background", "textShape": "Shape", "textSize": "Size", "textSlide": "Slide", diff --git a/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx index c8141ee4ca..9c39408838 100644 --- a/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/controller/edit/EditSlide.jsx @@ -140,6 +140,18 @@ class EditSlideController extends Component { this.closeModal(); }; + onResetBackground() { + const api = Common.EditorApi.get(); + const props = new Asc.CAscSlideProps(); + props.put_ResetBackground(true); + api.SetSlideProps(props); + } + + isLockResetBackground() { + const api = Common.EditorApi.get(); + return api.getSelectedElements()[0].get_ObjectValue().lockResetBackground; + } + render () { return ( ) } diff --git a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx index 26e4546968..2cec32c99f 100644 --- a/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx +++ b/apps/presentationeditor/mobile/src/view/edit/EditSlide.jsx @@ -11,7 +11,7 @@ import IconExpandUp from '@common-android-icons/icon-expand-up.svg'; const EditSlide = props => { const { t } = useTranslation(); - const _t = t('View.Edit', {returnObjects: true}); + const _t = t('View.Edit', {returnObjects: true}); return ( @@ -31,9 +31,12 @@ const EditSlide = props => { onDelay: props.onDelay, onApplyAll: props.onApplyAll }}> - + + + {props.onResetBackground()}}> {_t.textDuplicateSlide}