[DE PE SSE] Fix Bug 52819

This commit is contained in:
ShimaginAndrey 2021-09-30 13:13:27 +03:00
parent ba27f4d38a
commit 113dcc58f1
3 changed files with 35 additions and 10 deletions

View file

@ -508,7 +508,13 @@ const EditShape = props => {
const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill(); const canFill = props.storeFocusObjects.shapeObject.get_ShapeProperties().get_CanFill();
const shapeObject = props.storeFocusObjects.shapeObject; const shapeObject = props.storeFocusObjects.shapeObject;
const wrapType = props.storeShapeSettings.getWrapType(shapeObject); const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = !!props.storeFocusObjects.paragraphObject; let disableRemove = !!props.storeFocusObjects.paragraphObject;
return ( return (
@ -533,9 +539,11 @@ const EditShape = props => {
onOverlap: props.onOverlap, onOverlap: props.onOverlap,
onWrapDistance: props.onWrapDistance onWrapDistance: props.onWrapDistance
}}></ListItem> }}></ListItem>
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{ { !hideChangeType &&
onReplace: props.onReplace <ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
}}></ListItem> onReplace: props.onReplace
}}></ListItem>
}
{ wrapType !== 'inline' && <ListItem 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> }

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject; const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_CanFill(); const canFill = shapeObject && shapeObject.get_CanFill();
const shapeType = shapeObject.asc_getType();
const hideChangeType = shapeObject.get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = !!props.storeFocusObjects.paragraphObject; let disableRemove = !!props.storeFocusObjects.paragraphObject;
return ( return (
@ -30,9 +36,12 @@ const EditShape = props => {
onBorderColor: props.onBorderColor onBorderColor: props.onBorderColor
}}></ListItem> }}></ListItem>
} }
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{ { !hideChangeType &&
onReplace: props.onReplace <ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
}}></ListItem> onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{ <ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder onReorder: props.onReorder
}}></ListItem> }}></ListItem>

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject; const shapeObject = storeFocusObjects.shapeObject;
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill(); const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|| shapeType=='straightConnector1';
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1; let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
return ( return (
@ -30,9 +36,11 @@ const EditShape = props => {
onBorderColor: props.onBorderColor onBorderColor: props.onBorderColor
}}></ListItem> }}></ListItem>
} }
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{ { !hideChangeType &&
onReplace: props.onReplace <ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
}}></ListItem> onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{ <ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder onReorder: props.onReorder
}}></ListItem> }}></ListItem>