diff --git a/apps/common/main/lib/view/ShapeShadowDialog.js b/apps/common/main/lib/view/ShapeShadowDialog.js index dbebee8172..139fc266b9 100644 --- a/apps/common/main/lib/view/ShapeShadowDialog.js +++ b/apps/common/main/lib/view/ShapeShadowDialog.js @@ -113,7 +113,7 @@ define([ this.oldTransparency = this.shadowProps.getTransparency(); this.oldSize = this.shadowProps.getSize(); this.oldAngle = this.shadowProps.getAngle(); - this.oldDistance = this.shadowProps.getDistance(); + this.oldDistance = this._mm2pt(this.shadowProps.getDistance()); Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options); @@ -308,7 +308,7 @@ define([ setDistance: function(value) { var shapeProps = new Asc.asc_CShapeProperty(); - this.shadowProps.putDistance(value); + this.shadowProps.putDistance(this._pt2mm(value)); shapeProps.asc_putShadow(this.shadowProps); this.methodApplySettings && this.methodApplySettings.call(this, shapeProps); }, @@ -319,7 +319,7 @@ define([ this.shadowProps.putTransparency(transparency); this.shadowProps.putSize(size); this.shadowProps.putAngle(angle); - this.shadowProps.putDistance(distance); + this.shadowProps.putDistance(this._pt2mm(distance)); shapeProps.asc_putShadow(this.shadowProps); this.methodApplySettings && this.methodApplySettings.call(this, shapeProps); }, @@ -331,6 +331,14 @@ define([ getDefaultFocusableComponent: function () { return this.spinTransparency; }, + + _pt2mm: function(value) { + return (value * 25.4 / 72.0); + }, + + _mm2pt: function(value) { + return (value * 72.0 / 25.4); + }, onPrimary: function() { this.handleOkClose();