added reset background btn

This commit is contained in:
Danis
2025-08-27 18:43:51 +04:00
parent 2a41227199
commit 77e41ef6c3
3 changed files with 21 additions and 2 deletions

View File

@ -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",

View File

@ -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 (
<EditSlide
@ -155,6 +167,8 @@ class EditSlideController extends Component {
onFillColor={this.onFillColor}
onDuplicateSlide={this.onDuplicateSlide}
onRemoveSlide={this.onRemoveSlide}
onResetBackground={this.onResetBackground}
isLockResetBackground={this.isLockResetBackground}
/>
)
}

View File

@ -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 (
<Fragment>
@ -31,9 +31,12 @@ const EditSlide = props => {
onDelay: props.onDelay,
onApplyAll: props.onApplyAll
}}></ListItem>
<ListItem title={_t.textStyle} link="/style/" routeProps={{
</List>
<List>
<ListItem title={_t.textBackground} link="/style/" routeProps={{
onFillColor: props.onFillColor
}}></ListItem>
<ListItem className={props.isLockResetBackground() ? 'disabled' : ''} title={_t.textResetBackground} onClick={()=>{props.onResetBackground()}}></ListItem>
</List>
<List className="buttons-list">
<ListButton className="button-fill button-raised" onClick={props.onDuplicateSlide}>{_t.textDuplicateSlide}</ListButton>