Fix Bug 49412

This commit is contained in:
ShimaginAndrey 2021-07-20 12:10:13 +03:00
parent dcca2e189e
commit 54fb6bb142
2 changed files with 7 additions and 7 deletions

View file

@ -239,6 +239,7 @@ const EditImage = props => {
const storeFocusObjects = props.storeFocusObjects; const storeFocusObjects = props.storeFocusObjects;
const imageObject = storeFocusObjects.imageObject; const imageObject = storeFocusObjects.imageObject;
const pluginGuid = imageObject.asc_getPluginGuid(); const pluginGuid = imageObject.asc_getPluginGuid();
const wrapType = props.storeImageSettings.getWrapType(imageObject);
return ( return (
<Fragment> <Fragment>
@ -254,9 +255,9 @@ const EditImage = props => {
onReplaceByFile: props.onReplaceByFile, onReplaceByFile: props.onReplaceByFile,
onReplaceByUrl: props.onReplaceByUrl onReplaceByUrl: props.onReplaceByUrl
}}></ListItem> }}></ListItem>
<ListItem title={_t.textReorder} link='/edit-image-reorder/' routeProps={{ { wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-image-reorder/' routeProps={{
onReorder: props.onReorder onReorder: props.onReorder
}}></ListItem> }}></ListItem> }
</List> </List>
<List className="buttons-list"> <List className="buttons-list">
<ListButton className='button-fill button-raised' title={_t.textActualSize} onClick={() => {props.onDefaulSize()}}/> <ListButton className='button-fill button-raised' title={_t.textActualSize} onClick={() => {props.onDefaulSize()}}/>
@ -266,7 +267,7 @@ const EditImage = props => {
) )
}; };
const EditImageContainer = inject("storeFocusObjects")(observer(EditImage)); const EditImageContainer = inject("storeFocusObjects", "storeImageSettings")(observer(EditImage));
const PageWrapContainer = inject("storeFocusObjects", "storeImageSettings")(observer(PageWrap)); const PageWrapContainer = inject("storeFocusObjects", "storeImageSettings")(observer(PageWrap));
const PageReplaceContainer = inject("storeFocusObjects")(observer(PageReplace)); const PageReplaceContainer = inject("storeFocusObjects")(observer(PageReplace));
const PageReorderContainer = inject("storeFocusObjects")(observer(PageReorder)); const PageReorderContainer = inject("storeFocusObjects")(observer(PageReorder));

View file

@ -506,9 +506,8 @@ const EditShape = props => {
const { t } = useTranslation(); const { t } = useTranslation();
const _t = t('Edit', {returnObjects: true}); const _t = t('Edit', {returnObjects: true});
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill(); const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
const storeShapeSettings = props.storeShapeSettings;
const shapeObject = props.storeFocusObjects.shapeObject; const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = storeShapeSettings.getWrapType(shapeObject); const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
let disableRemove = !!props.storeFocusObjects.paragraphObject; let disableRemove = !!props.storeFocusObjects.paragraphObject;
@ -537,9 +536,9 @@ const EditShape = props => {
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{ <ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
onReplace: props.onReplace onReplace: props.onReplace
}}></ListItem> }}></ListItem>
<ListItem disabled={wrapType === 'inline' ? true : false } title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{ { wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
onReorder: props.onReorder onReorder: props.onReorder
}}></ListItem> }}></ListItem> }
</List> </List>
<List className="buttons-list"> <List className="buttons-list">
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}} className={`button-red button-fill button-raised${disableRemove ? ' disabled' : ''}`} /> <ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}} className={`button-red button-fill button-raised${disableRemove ? ' disabled' : ''}`} />