Skip to content

Commit

Permalink
Merge pull request #2889 from ONLYOFFICE/fix/bug-66914
Browse files Browse the repository at this point in the history
Fix bug 66914
  • Loading branch information
JuliaRadzhabova authored Mar 18, 2024
2 parents a0ec143 + ba4f0eb commit 2f32ed3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/common/main/lib/view/ShapeShadowDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
},
Expand All @@ -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);
},
Expand All @@ -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();
Expand Down

0 comments on commit 2f32ed3

Please sign in to comment.