Merge pull request #1628 from ONLYOFFICE/feature/fix-bug-react
[DE PE SSE] Fix Bug 55970
This commit is contained in:
commit
ba2a62786d
|
@ -511,11 +511,14 @@ const EditShape = props => {
|
||||||
const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
|
const wrapType = props.storeShapeSettings.getWrapType(shapeObject);
|
||||||
|
|
||||||
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
|
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
|
||||||
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeObject.get_ShapeProperties().get_FromSmartArt()
|
||||||
|
|| shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
||||||
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
||||||
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
||||||
|| shapeType=='straightConnector1';
|
|| shapeType=='straightConnector1';
|
||||||
|
|
||||||
|
const isSmartArtInternal = shapeObject.get_ShapeProperties().get_FromSmartArtInternal();
|
||||||
|
const isFromGroup = shapeObject.get_ShapeProperties().get_FromGroup();
|
||||||
const inControl = api.asc_IsContentControl();
|
const inControl = api.asc_IsContentControl();
|
||||||
const controlProps = (api && inControl) ? api.asc_GetContentControlProperties() : null;
|
const controlProps = (api && inControl) ? api.asc_GetContentControlProperties() : null;
|
||||||
const lockType = controlProps ? controlProps.get_Lock() : Asc.c_oAscSdtLockType.Unlocked;
|
const lockType = controlProps ? controlProps.get_Lock() : Asc.c_oAscSdtLockType.Unlocked;
|
||||||
|
@ -545,6 +548,7 @@ const EditShape = props => {
|
||||||
onBorderColor: props.onBorderColor
|
onBorderColor: props.onBorderColor
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
: null}
|
: null}
|
||||||
|
{ !isFromGroup &&
|
||||||
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
|
<ListItem title={_t.textWrap} link='/edit-shape-wrap/' routeProps={{
|
||||||
onWrapType: props.onWrapType,
|
onWrapType: props.onWrapType,
|
||||||
onShapeAlign: props.onShapeAlign,
|
onShapeAlign: props.onShapeAlign,
|
||||||
|
@ -552,12 +556,13 @@ const EditShape = props => {
|
||||||
onOverlap: props.onOverlap,
|
onOverlap: props.onOverlap,
|
||||||
onWrapDistance: props.onWrapDistance
|
onWrapDistance: props.onWrapDistance
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
|
}
|
||||||
{(!hideChangeType && !fixedSize) &&
|
{(!hideChangeType && !fixedSize) &&
|
||||||
<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>
|
||||||
}
|
}
|
||||||
{wrapType !== 'inline' && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
|
{ (wrapType !== 'inline' && !isSmartArtInternal) && <ListItem title={_t.textReorder} link='/edit-shape-reorder/' routeProps={{
|
||||||
onReorder: props.onReorder
|
onReorder: props.onReorder
|
||||||
}}></ListItem> }
|
}}></ListItem> }
|
||||||
</List>
|
</List>
|
||||||
|
|
|
@ -13,11 +13,13 @@ const EditShape = props => {
|
||||||
const canFill = shapeObject && shapeObject.get_CanFill();
|
const canFill = shapeObject && shapeObject.get_CanFill();
|
||||||
|
|
||||||
const shapeType = shapeObject.asc_getType();
|
const shapeType = shapeObject.asc_getType();
|
||||||
const hideChangeType = shapeObject.get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
const hideChangeType = shapeObject.get_FromChart() || shapeObject.get_FromSmartArt()
|
||||||
|
|| shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
||||||
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
||||||
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
||||||
|| shapeType=='straightConnector1';
|
|| shapeType=='straightConnector1';
|
||||||
|
|
||||||
|
const isSmartArtInternal = shapeObject.get_FromSmartArtInternal();
|
||||||
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
let disableRemove = !!props.storeFocusObjects.paragraphObject;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -41,10 +43,11 @@ const EditShape = props => {
|
||||||
onReplace: props.onReplace
|
onReplace: props.onReplace
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
}
|
}
|
||||||
|
{ !isSmartArtInternal &&
|
||||||
<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>
|
||||||
|
}
|
||||||
<ListItem title={_t.textAlign} link="/edit-align-shape/" routeProps={{
|
<ListItem title={_t.textAlign} link="/edit-align-shape/" routeProps={{
|
||||||
onAlign: props.onAlign
|
onAlign: props.onAlign
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
|
|
|
@ -13,11 +13,13 @@ const EditShape = props => {
|
||||||
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
|
const canFill = shapeObject && shapeObject.get_ShapeProperties().asc_getCanFill();
|
||||||
|
|
||||||
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
|
const shapeType = shapeObject.get_ShapeProperties().asc_getType();
|
||||||
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
const hideChangeType = shapeObject.get_ShapeProperties().get_FromChart() || shapeObject.get_ShapeProperties().get_FromSmartArt()
|
||||||
|
|| shapeType=='line' || shapeType=='bentConnector2' || shapeType=='bentConnector3'
|
||||||
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
|| shapeType=='bentConnector4' || shapeType=='bentConnector5' || shapeType=='curvedConnector2'
|
||||||
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
|| shapeType=='curvedConnector3' || shapeType=='curvedConnector4' || shapeType=='curvedConnector5'
|
||||||
|| shapeType=='straightConnector1';
|
|| shapeType=='straightConnector1';
|
||||||
|
|
||||||
|
const isSmartArtInternal = shapeObject.get_ShapeProperties().get_FromSmartArtInternal();
|
||||||
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
|
let disableRemove = storeFocusObjects.selections.indexOf('text') > -1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -41,9 +43,11 @@ const EditShape = props => {
|
||||||
onReplace: props.onReplace
|
onReplace: props.onReplace
|
||||||
}}></ListItem>
|
}}></ListItem>
|
||||||
}
|
}
|
||||||
|
{ !isSmartArtInternal &&
|
||||||
<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>
|
||||||
|
}
|
||||||
</List>
|
</List>
|
||||||
<List className="buttons-list">
|
<List className="buttons-list">
|
||||||
<ListButton className={`button-red button-fill button-raised${disableRemove ? ' disabled' : ''}`} onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListButton>
|
<ListButton className={`button-red button-fill button-raised${disableRemove ? ' disabled' : ''}`} onClick={props.onRemoveShape}>{_t.textRemoveShape}</ListButton>
|
||||||
|
|
Loading…
Reference in a new issue