mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 05:25:41 +08:00
added reset background btn
This commit is contained in:
@ -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",
|
||||
|
||||
@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user