Disable button in doc

This commit is contained in:
ShimaginAndrey 2021-05-31 12:51:18 +03:00
parent 552362ed55
commit 06da18294a
2 changed files with 7 additions and 1 deletions

View file

@ -507,6 +507,10 @@ const EditShape = props => {
const storeShapeSettings = props.storeShapeSettings; const storeShapeSettings = props.storeShapeSettings;
const shapeObject = props.storeFocusObjects.shapeObject; const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = storeShapeSettings.getWrapType(shapeObject); const wrapType = storeShapeSettings.getWrapType(shapeObject);
let setDisabled = true;
props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false;
return ( return (
<Fragment> <Fragment>
<List> <List>
@ -537,7 +541,8 @@ const EditShape = props => {
}}></ListItem> }}></ListItem>
</List> </List>
<List> <List>
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}} className='button-red button-fill button-raised'/> <ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}}
className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} />
</List> </List>
</Fragment> </Fragment>
) )

View file

@ -11,6 +11,7 @@ const EditShape = props => {
const storeFocusObjects = props.storeFocusObjects; const storeFocusObjects = props.storeFocusObjects;
const shapeObject = storeFocusObjects.shapeObject; const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
let setDisabled = true;
return ( return (
<Fragment> <Fragment>