Fix Bug 44360
This commit is contained in:
parent
06da18294a
commit
a7e8f1812e
|
@ -507,9 +507,8 @@ 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;
|
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
||||||
props.storeFocusObjects.paragraphObject ? setDisabled = true : setDisabled = false;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
@ -542,7 +541,7 @@ const EditShape = props => {
|
||||||
</List>
|
</List>
|
||||||
<List>
|
<List>
|
||||||
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}}
|
<ListButton title={_t.textRemoveShape} onClick={() => {props.onRemoveShape()}}
|
||||||
className={`button-red button-fill button-raised ${setDisabled ? 'disabled' : ''}`} />
|
className={`button-red button-fill button-raised ${disableRemove ? 'disabled' : ''}`} />
|
||||||
</List>
|
</List>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,7 +11,8 @@ 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;
|
|
||||||
|
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
@ -37,7 +38,8 @@ const EditShape = props => {
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
</List>
|
</List>
|
||||||
<List className="buttons-list">
|
<List className="buttons-list">
|
||||||
<ListItem href="#" className="button button-raised button-red" onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListItem>
|
<ListItem href="#" className={`button button-raised button-red
|
||||||
|
${disableRemove ? 'disabled' : ''}`} onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListItem>
|
||||||
</List>
|
</List>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue