[DE] Fix bug in shape shape menu

This commit is contained in:
Alexei Koshelev
2024-01-17 21:31:12 +03:00
parent 3663e4ee36
commit f1b62da2ab
2 changed files with 11 additions and 11 deletions

View File

@ -105,16 +105,6 @@ define([
this.methodApplySettings = options.methodApplySettings;
this.isShadowEmpty = !this.shadowProps;
if(!this.shadowProps) {
this.shadowProps = new Asc.asc_CShadowProperty();
this.shadowProps.putPreset('t');
}
this.oldTransparency = this.shadowProps.getTransparency();
this.oldSize = this.shadowProps.getSize();
this.oldAngle = this.shadowProps.getAngle();
this.oldDistance = this.shadowProps.getDistance();
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@ -122,11 +112,19 @@ define([
Common.Views.AdvancedSettingsWindow.prototype.render.call(this);
this.api.setStartPointHistory();
var shapeProps = new Asc.asc_CShapeProperty();
this.methodApplySettings && this.methodApplySettings.call(this, shapeProps);
if(this.isShadowEmpty) {
var shapeProps = new Asc.asc_CShapeProperty();
this.shadowProps = new Asc.asc_CShadowProperty();
this.shadowProps.putPreset('t');
shapeProps.asc_putShadow(this.shadowProps);
this.methodApplySettings && this.methodApplySettings.call(this, shapeProps);
}
this.oldTransparency = this.shadowProps.getTransparency();
this.oldSize = this.shadowProps.getSize();
this.oldAngle = this.shadowProps.getAngle();
this.oldDistance = this.shadowProps.getDistance();
this.sldrTransparency = new Common.UI.SingleSlider({
el: $('#shape-shadow-transparency-slider'),
@ -234,6 +232,7 @@ define([
this.spinDistance.setValue(this.oldDistance, true);
this.spinDistance.on('change', _.bind(this.onSpinnerDistanceChange, this));
this.setAllProperties(this.oldTransparency, this.oldSize, this.oldAngle, this.oldDistance);
this.on('close', _.bind(this.handleCancelClose, this));
},

View File

@ -2135,6 +2135,7 @@ define([
methodApplySettings: function(shapeProps) {
me.imgprops.put_ShapeProperties(shapeProps);
me.api.ImgApply(me.imgprops);
me.api.ImgApply(me.imgprops);
},
handler: function(result) {
me.fireEvent('editcomplete', this);