diff --git a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js
index 0899cc590..9d2a4d4b1 100644
--- a/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js
+++ b/apps/presentationeditor/main/app/view/ShapeSettingsAdvanced.js
@@ -64,7 +64,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
{panelId: 'id-adv-shape-width', panelCaption: this.textSize},
{panelId: 'id-adv-shape-rotate', panelCaption: this.textRotation},
{panelId: 'id-adv-shape-shape', panelCaption: this.textWeightArrows},
- {panelId: 'id-adv-shape-margins', panelCaption: this.strMargins},
+ {panelId: 'id-adv-shape-margins', panelCaption: this.textTextBox},
{panelId: 'id-adv-shape-columns', panelCaption: this.strColumns},
{panelId: 'id-adv-shape-alttext', panelCaption: this.textAlt}
],
@@ -232,6 +232,30 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
}, this));
this.spinners.push(this.spnMarginRight);
+ this.radioNofit = new Common.UI.RadioBox({
+ el: $('#shape-radio-nofit'),
+ name: 'asc-radio-fit',
+ labelText: this.textNofit,
+ value: AscFormat.text_fit_No
+ });
+ this.radioNofit.on('change', _.bind(this.onRadioFitChange, this));
+
+ this.radioShrink = new Common.UI.RadioBox({
+ el: $('#shape-radio-shrink'),
+ name: 'asc-radio-fit',
+ labelText: this.textShrink,
+ value: AscFormat.text_fit_NormAuto
+ });
+ this.radioShrink.on('change', _.bind(this.onRadioFitChange, this));
+
+ this.radioFit = new Common.UI.RadioBox({
+ el: $('#shape-radio-fit'),
+ name: 'asc-radio-fit',
+ labelText: this.textResizeFit,
+ value: AscFormat.text_fit_Auto
+ });
+ this.radioFit.on('change', _.bind(this.onRadioFitChange, this));
+
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-angle'),
@@ -526,6 +550,18 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
val = margins.get_Bottom();
this.spnMarginBottom.setValue((null !== val && undefined !== val) ? Common.Utils.Metric.fnRecalcFromMM(val) : '', true);
}
+ value = props.asc_getTextFitType();
+ switch (value) {
+ case AscFormat.text_fit_No:
+ this.radioNofit.setValue(true, true);
+ break;
+ case AscFormat.text_fit_Auto:
+ this.radioFit.setValue(true, true);
+ break;
+ case AscFormat.text_fit_NormAuto:
+ this.radioShrink.setValue(true, true);
+ break;
+ }
this.btnsCategory[3].setDisabled(null === margins); // Margins
var shapetype = props.asc_getType();
@@ -734,6 +770,12 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this._selectStyleItem(this.btnEndSize, record);
},
+ onRadioFitChange: function(field, newValue, eOpts) {
+ if (newValue && this._changedProps) {
+ this._changedProps.asc_putTextFitType(field.options.value);
+ }
+ },
+
textRound: 'Round',
textMiter: 'Miter',
textSquare: 'Square',
@@ -770,7 +812,12 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
textAngle: 'Angle',
textFlipped: 'Flipped',
textHorizontally: 'Horizontally',
- textVertically: 'Vertically'
+ textVertically: 'Vertically',
+ textTextBox: 'Text Box',
+ textAutofit: 'AutoFit',
+ textNofit: 'Do not Autofit',
+ textShrink: 'Shrink text on overflow',
+ textResizeFit: 'Resize shape to fit text'
}, PE.Views.ShapeSettingsAdvanced || {}));
});
\ No newline at end of file
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index bb5ab8034..c0c1a31c3 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -1457,6 +1457,11 @@
"PE.Views.ShapeSettingsAdvanced.textWeightArrows": "Weights & Arrows",
"PE.Views.ShapeSettingsAdvanced.textWidth": "Width",
"PE.Views.ShapeSettingsAdvanced.txtNone": "None",
+ "PE.Views.ShapeSettingsAdvanced.textTextBox": "Text Box",
+ "PE.Views.ShapeSettingsAdvanced.textAutofit": "AutoFit",
+ "PE.Views.ShapeSettingsAdvanced.textResizeFit": "Resize shape to fit text",
+ "PE.Views.ShapeSettingsAdvanced.textNofit": "Do not Autofit",
+ "PE.Views.ShapeSettingsAdvanced.textShrink": "Shrink text on overflow",
"PE.Views.SignatureSettings.notcriticalErrorTitle": "Warning",
"PE.Views.SignatureSettings.strDelete": "Remove Signature",
"PE.Views.SignatureSettings.strDetails": "Signature Details",
|