mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 02:29:58 +08:00
fix reset background btn
This commit is contained in:
@ -147,11 +147,6 @@ class EditSlideController extends Component {
|
||||
api.SetSlideProps(props);
|
||||
}
|
||||
|
||||
isLockResetBackground() {
|
||||
const api = Common.EditorApi.get();
|
||||
return api.getSelectedElements()[0].get_ObjectValue().lockResetBackground;
|
||||
}
|
||||
|
||||
render () {
|
||||
return (
|
||||
<EditSlide
|
||||
@ -168,7 +163,6 @@ class EditSlideController extends Component {
|
||||
onDuplicateSlide={this.onDuplicateSlide}
|
||||
onRemoveSlide={this.onRemoveSlide}
|
||||
onResetBackground={this.onResetBackground}
|
||||
isLockResetBackground={this.isLockResetBackground}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@ -11,7 +11,9 @@ 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});
|
||||
const storeFocusObjects = props.storeFocusObjects;
|
||||
const isLockResetBackground = storeFocusObjects.slideObject.get_LockResetBackground();
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
@ -36,7 +38,7 @@ const EditSlide = props => {
|
||||
<ListItem title={_t.textBackground} link="/style/" routeProps={{
|
||||
onFillColor: props.onFillColor
|
||||
}}></ListItem>
|
||||
<ListItem className={props.isLockResetBackground() ? 'disabled' : ''} title={_t.textResetBackground} onClick={()=>{props.onResetBackground()}}></ListItem>
|
||||
<ListItem className={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>
|
||||
@ -94,6 +96,7 @@ const PageLayout = props => {
|
||||
storeSlideSettings.changeSlideLayoutIndex(storeFocusObjects.slideObject.get_LayoutIndex());
|
||||
const arrayLayouts = storeSlideSettings.slideLayouts;
|
||||
const slideLayoutIndex = storeSlideSettings.slideLayoutIndex;
|
||||
|
||||
|
||||
return (
|
||||
<Page className="slide-layout">
|
||||
@ -498,6 +501,7 @@ const PageCustomFillColor = props => {
|
||||
)
|
||||
};
|
||||
|
||||
const InjectEditSlide = inject("storeFocusObjects")(observer(EditSlide));
|
||||
const Theme = inject("storeSlideSettings")(observer(PageTheme));
|
||||
const Layout = inject("storeSlideSettings", "storeFocusObjects")(observer(PageLayout));
|
||||
const Transition = inject("storeSlideSettings", "storeFocusObjects")(observer(PageTransition));
|
||||
@ -507,7 +511,7 @@ const StyleFillColor = inject("storeSlideSettings", "storePalette", "storeFocusO
|
||||
const CustomFillColor = inject("storeSlideSettings", "storePalette", "storeFocusObjects")(observer(PageCustomFillColor));
|
||||
|
||||
export {
|
||||
EditSlide,
|
||||
InjectEditSlide as EditSlide,
|
||||
Theme,
|
||||
Layout,
|
||||
Transition,
|
||||
|
||||
Reference in New Issue
Block a user