[SSE] Add overflow settings for shape

This commit is contained in:
Julia Radzhabova 2020-02-26 14:24:58 +03:00
parent 54335503c4
commit a4aac1aa0e
3 changed files with 22 additions and 2 deletions

View file

@ -103,10 +103,15 @@
</td>
</tr>
<tr>
<td class="padding-large">
<td class="padding-small">
<div id="shape-checkbox-autofit"></div>
</td>
</tr>
<tr>
<td class="padding-large">
<div id="shape-checkbox-overflow"></div>
</td>
</tr>
</table>
<div class="separator horizontal padding-large"></div>
<table cols="2" style="width: 100%;">

View file

@ -261,6 +261,18 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
}
}, this));
this.chOverflow = new Common.UI.CheckBox({
el: $('#shape-checkbox-overflow'),
labelText: this.textOverflow
});
this.chOverflow.on('change', _.bind(function(field, newValue, oldValue, eOpts){
if (this._changedProps) {
if (this._changedProps.asc_getShapeProperties()===null || this._changedProps.asc_getShapeProperties()===undefined)
this._changedProps.asc_putShapeProperties(new Asc.asc_CShapeProperty());
this._changedProps.asc_getShapeProperties().asc_putVertOverflowType(field.getValue()=='checked' ? AscFormat.nOTOwerflow : AscFormat.nOTClip);
}
}, this));
// Rotation
this.spnAngle = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-angle'),
@ -601,6 +613,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
this.btnsCategory[3].setDisabled(null === margins); // Margins
this.chAutofit.setValue(shapeprops.asc_getTextFitType()==AscFormat.text_fit_Auto);
this.chOverflow.setValue(shapeprops.asc_getVertOverflowType()==AscFormat.nOTOwerflow);
var shapetype = shapeprops.asc_getType();
this.btnsCategory[4].setDisabled(shapetype=='line' || shapetype=='bentConnector2' || shapetype=='bentConnector3'
@ -880,7 +893,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ShapeSettingsAdvanced.temp
textTwoCell: 'Move and size with cells',
textTextBox: 'Text Box',
textAutofit: 'AutoFit',
textResizeFit: 'Resize shape to fit text'
textResizeFit: 'Resize shape to fit text',
textOverflow: 'Allow text to overflow shape'
}, SSE.Views.ShapeSettingsAdvanced || {}));
});

View file

@ -2075,6 +2075,7 @@
"SSE.Views.ShapeSettingsAdvanced.textTextBox": "Text Box",
"SSE.Views.ShapeSettingsAdvanced.textAutofit": "AutoFit",
"SSE.Views.ShapeSettingsAdvanced.textResizeFit": "Resize shape to fit text",
"SSE.Views.ShapeSettingsAdvanced.textOverflow": "Allow text to overflow shape",
"SSE.Views.SignatureSettings.notcriticalErrorTitle": "Warning",
"SSE.Views.SignatureSettings.strDelete": "Remove Signature",
"SSE.Views.SignatureSettings.strDetails": "Signature Details",