[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 shapeObject = props.storeFocusObjects.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;
return (
@ -533,9 +539,11 @@ const EditShape = props => {
onOverlap: props.onOverlap,
onWrapDistance: props.onWrapDistance
}}></ListItem>
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
onReplace: props.onReplace
}}></ListItem>
{ !hideChangeType &&
<ListItem title={_t.textReplace} link='/edit-shape-replace/' routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
{ wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
onReorder: props.onReorder
}}></ListItem> }

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject;
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;
return (
@ -30,9 +36,12 @@ const EditShape = props => {
onBorderColor: props.onBorderColor
}}></ListItem>
}
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
{ !hideChangeType &&
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder
}}></ListItem>

View file

@ -12,6 +12,12 @@ const EditShape = props => {
const shapeObject = storeFocusObjects.shapeObject;
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;
return (
@ -30,9 +36,11 @@ const EditShape = props => {
onBorderColor: props.onBorderColor
}}></ListItem>
}
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
{ !hideChangeType &&
<ListItem title={_t.textReplace} link="/edit-replace-shape/" routeProps={{
onReplace: props.onReplace
}}></ListItem>
}
<ListItem title={_t.textReorder} link="/edit-reorder-shape/" routeProps={{
onReorder: props.onReorder
}}></ListItem>