diff --git a/apps/common/main/lib/view/ShapeShadowDialog.js b/apps/common/main/lib/view/ShapeShadowDialog.js index dbebee8172..55ce2b3c86 100644 --- a/apps/common/main/lib/view/ShapeShadowDialog.js +++ b/apps/common/main/lib/view/ShapeShadowDialog.js @@ -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)); }, diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 0f1bc7b898..f199421630 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -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);