Disable flip for shape in smart art
This commit is contained in:
parent
03b86016c5
commit
c19fd3b831
|
@ -2767,9 +2767,11 @@ define([
|
||||||
menuImgReplace.menu.items[2].setVisible(me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1);
|
menuImgReplace.menu.items[2].setVisible(me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1);
|
||||||
|
|
||||||
menuImgRotate.setVisible(!value.imgProps.isChart && (pluginGuid===null || pluginGuid===undefined));
|
menuImgRotate.setVisible(!value.imgProps.isChart && (pluginGuid===null || pluginGuid===undefined));
|
||||||
if (menuImgRotate.isVisible())
|
if (menuImgRotate.isVisible()) {
|
||||||
menuImgRotate.setDisabled(islocked || value.imgProps.isSmartArt);
|
menuImgRotate.setDisabled(islocked || value.imgProps.isSmartArt);
|
||||||
|
menuImgRotate.menu.items[3].setDisabled(value.imgProps.isSmartArtInternal);
|
||||||
|
menuImgRotate.menu.items[4].setDisabled(value.imgProps.isSmartArtInternal);
|
||||||
|
}
|
||||||
me.menuImgCrop.setVisible(me.api.asc_canEditCrop());
|
me.menuImgCrop.setVisible(me.api.asc_canEditCrop());
|
||||||
if (me.menuImgCrop.isVisible())
|
if (me.menuImgCrop.isVisible())
|
||||||
me.menuImgCrop.setDisabled(islocked);
|
me.menuImgCrop.setDisabled(islocked);
|
||||||
|
|
|
@ -1561,6 +1561,8 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat
|
||||||
}
|
}
|
||||||
if (props.get_FromSmartArtInternal()) {
|
if (props.get_FromSmartArtInternal()) {
|
||||||
this.chAutofit.setDisabled(true);
|
this.chAutofit.setDisabled(true);
|
||||||
|
this.chFlipHor.setDisabled(true);
|
||||||
|
this.chFlipVert.setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var stroke = props.get_stroke();
|
var stroke = props.get_stroke();
|
||||||
|
|
|
@ -822,6 +822,8 @@ define([
|
||||||
this._originalProps = new Asc.asc_CImgProperty(props);
|
this._originalProps = new Asc.asc_CImgProperty(props);
|
||||||
|
|
||||||
this._noApply = true;
|
this._noApply = true;
|
||||||
|
this._state.isFromImage = !!shapeprops.get_FromImage();
|
||||||
|
this._state.isFromSmartArtInternal = !!shapeprops.get_FromSmartArtInternal();
|
||||||
|
|
||||||
this.disableControls(this._locked, !shapeprops.get_CanFill());
|
this.disableControls(this._locked, !shapeprops.get_CanFill());
|
||||||
this.hideShapeOnlySettings(shapeprops.get_FromChart() || !!shapeprops.get_FromImage());
|
this.hideShapeOnlySettings(shapeprops.get_FromChart() || !!shapeprops.get_FromImage());
|
||||||
|
@ -832,10 +834,8 @@ define([
|
||||||
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
||||||
|| shapetype=='straightConnector1';
|
|| shapetype=='straightConnector1';
|
||||||
this.hideChangeTypeSettings(hidechangetype || control_props);
|
this.hideChangeTypeSettings(hidechangetype || control_props);
|
||||||
this._state.isFromImage = !!shapeprops.get_FromImage();
|
|
||||||
this._state.isFromSmartArtInternal = !!shapeprops.get_FromSmartArtInternal();
|
|
||||||
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
||||||
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || shapeprops.get_FromSmartArtInternal());
|
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || this._state.isFromSmartArtInternal);
|
||||||
}
|
}
|
||||||
|
|
||||||
var value = props.get_WrappingStyle();
|
var value = props.get_WrappingStyle();
|
||||||
|
@ -1986,6 +1986,8 @@ define([
|
||||||
});
|
});
|
||||||
this.linkAdvanced.toggleClass('disabled', disable);
|
this.linkAdvanced.toggleClass('disabled', disable);
|
||||||
}
|
}
|
||||||
|
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
|
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
},
|
},
|
||||||
|
|
||||||
hideShapeOnlySettings: function(value) {
|
hideShapeOnlySettings: function(value) {
|
||||||
|
|
|
@ -3579,8 +3579,11 @@ define([
|
||||||
mnuArrangeBackward.setDisabled(inSmartartInternal);
|
mnuArrangeBackward.setDisabled(inSmartartInternal);
|
||||||
|
|
||||||
menuImgShapeRotate.setVisible(_.isUndefined(value.chartProps) && (pluginGuid===null || pluginGuid===undefined));
|
menuImgShapeRotate.setVisible(_.isUndefined(value.chartProps) && (pluginGuid===null || pluginGuid===undefined));
|
||||||
if (menuImgShapeRotate.isVisible())
|
if (menuImgShapeRotate.isVisible()) {
|
||||||
menuImgShapeRotate.setDisabled(disabled || (value.shapeProps && value.shapeProps.value.get_FromSmartArt()));
|
menuImgShapeRotate.setDisabled(disabled || (value.shapeProps && value.shapeProps.value.get_FromSmartArt()));
|
||||||
|
menuImgShapeRotate.menu.items[3].setDisabled(inSmartartInternal);
|
||||||
|
menuImgShapeRotate.menu.items[4].setDisabled(inSmartartInternal);
|
||||||
|
}
|
||||||
|
|
||||||
// image properties
|
// image properties
|
||||||
menuImgOriginalSize.setVisible(isimage);
|
menuImgOriginalSize.setVisible(isimage);
|
||||||
|
|
|
@ -766,6 +766,8 @@ define([
|
||||||
{
|
{
|
||||||
this._originalProps = props;
|
this._originalProps = props;
|
||||||
this._noApply = true;
|
this._noApply = true;
|
||||||
|
this._state.isFromImage = !!props.get_FromImage();
|
||||||
|
this._state.isFromSmartArtInternal = !!props.get_FromSmartArtInternal();
|
||||||
|
|
||||||
var shapetype = props.asc_getType();
|
var shapetype = props.asc_getType();
|
||||||
|
|
||||||
|
@ -778,10 +780,8 @@ define([
|
||||||
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
||||||
|| shapetype=='straightConnector1';
|
|| shapetype=='straightConnector1';
|
||||||
this.hideChangeTypeSettings(hidechangetype);
|
this.hideChangeTypeSettings(hidechangetype);
|
||||||
this._state.isFromImage = !!props.get_FromImage();
|
|
||||||
this._state.isFromSmartArtInternal = !!props.get_FromSmartArtInternal();
|
|
||||||
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
||||||
this.btnChangeShape.shapePicker.hideTextRect(props.get_FromImage() || props.get_FromSmartArtInternal());
|
this.btnChangeShape.shapePicker.hideTextRect(props.get_FromImage() || this._state.isFromSmartArtInternal);
|
||||||
}
|
}
|
||||||
|
|
||||||
// background colors
|
// background colors
|
||||||
|
@ -1849,6 +1849,8 @@ define([
|
||||||
});
|
});
|
||||||
this.linkAdvanced.toggleClass('disabled', disable);
|
this.linkAdvanced.toggleClass('disabled', disable);
|
||||||
}
|
}
|
||||||
|
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
|
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
},
|
},
|
||||||
|
|
||||||
hideShapeOnlySettings: function(value) {
|
hideShapeOnlySettings: function(value) {
|
||||||
|
|
|
@ -576,6 +576,8 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
|
||||||
this.radioNofit.setDisabled(true);
|
this.radioNofit.setDisabled(true);
|
||||||
this.radioShrink.setDisabled(true);
|
this.radioShrink.setDisabled(true);
|
||||||
this.radioFit.setDisabled(true);
|
this.radioFit.setDisabled(true);
|
||||||
|
this.chFlipHor.setDisabled(true);
|
||||||
|
this.chFlipVert.setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Width()).toFixed(2), true);
|
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.get_Width()).toFixed(2), true);
|
||||||
|
|
|
@ -1937,6 +1937,8 @@ define([
|
||||||
|
|
||||||
documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined) && !isslicermenu);
|
documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined) && !isslicermenu);
|
||||||
documentHolder.menuImgRotate.setDisabled(isObjLocked || isSmartArt);
|
documentHolder.menuImgRotate.setDisabled(isObjLocked || isSmartArt);
|
||||||
|
documentHolder.menuImgRotate.menu.items[3].setDisabled(isSmartArtInternal);
|
||||||
|
documentHolder.menuImgRotate.menu.items[4].setDisabled(isSmartArtInternal);
|
||||||
|
|
||||||
documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop());
|
documentHolder.menuImgCrop.setVisible(this.api.asc_canEditCrop());
|
||||||
documentHolder.menuImgCrop.setDisabled(isObjLocked);
|
documentHolder.menuImgCrop.setDisabled(isObjLocked);
|
||||||
|
|
|
@ -764,6 +764,8 @@ define([
|
||||||
this._originalProps = shapeprops;
|
this._originalProps = shapeprops;
|
||||||
|
|
||||||
this._noApply = true;
|
this._noApply = true;
|
||||||
|
this._state.isFromImage = !!shapeprops.get_FromImage();
|
||||||
|
this._state.isFromSmartArtInternal = !!shapeprops.asc_getFromSmartArtInternal();
|
||||||
|
|
||||||
this.disableControls(this._locked, !shapeprops.asc_getCanFill());
|
this.disableControls(this._locked, !shapeprops.asc_getCanFill());
|
||||||
this.hideShapeOnlySettings(shapeprops.asc_getFromChart() || !!shapeprops.asc_getFromImage());
|
this.hideShapeOnlySettings(shapeprops.asc_getFromChart() || !!shapeprops.asc_getFromImage());
|
||||||
|
@ -774,10 +776,8 @@ define([
|
||||||
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
|| shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5'
|
||||||
|| shapetype=='straightConnector1';
|
|| shapetype=='straightConnector1';
|
||||||
this.hideChangeTypeSettings(hidechangetype);
|
this.hideChangeTypeSettings(hidechangetype);
|
||||||
this._state.isFromImage = !!shapeprops.get_FromImage();
|
|
||||||
this._state.isFromSmartArtInternal = !!shapeprops.asc_getFromSmartArtInternal();
|
|
||||||
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
if (!hidechangetype && this.btnChangeShape.menu.items.length) {
|
||||||
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || shapeprops.asc_getFromSmartArtInternal());
|
this.btnChangeShape.shapePicker.hideTextRect(shapeprops.get_FromImage() || this._state.isFromSmartArtInternal);
|
||||||
}
|
}
|
||||||
|
|
||||||
// background colors
|
// background colors
|
||||||
|
@ -1868,6 +1868,8 @@ define([
|
||||||
});
|
});
|
||||||
this.linkAdvanced.toggleClass('disabled', disable);
|
this.linkAdvanced.toggleClass('disabled', disable);
|
||||||
}
|
}
|
||||||
|
this.btnFlipV.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
|
this.btnFlipH.setDisabled(disable || this._state.isFromSmartArtInternal);
|
||||||
},
|
},
|
||||||
|
|
||||||
hideShapeOnlySettings: function(value) {
|
hideShapeOnlySettings: function(value) {
|
||||||
|
|
|
@ -635,6 +635,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
|
||||||
if (shapeprops.asc_getFromSmartArtInternal()) {
|
if (shapeprops.asc_getFromSmartArtInternal()) {
|
||||||
this.chAutofit.setDisabled(true);
|
this.chAutofit.setDisabled(true);
|
||||||
this.chOverflow.setDisabled(true);
|
this.chOverflow.setDisabled(true);
|
||||||
|
this.chFlipHor.setDisabled(true);
|
||||||
|
this.chFlipVert.setDisabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true);
|
this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(props.asc_getWidth()).toFixed(2), true);
|
||||||
|
|
Loading…
Reference in a new issue