diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js index 3ea29b372..e899abffd 100644 --- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js @@ -136,6 +136,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat if (this._changedProps) { this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue())); + this._changedProps.put_ResetCrop(false); } }, this)); this.spinners.push(this.spnWidth); @@ -163,6 +164,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat if (this._changedProps) { this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); + this._changedProps.put_ResetCrop(false); } }, this)); this.spinners.push(this.spnHeight); @@ -177,6 +179,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat if (this._changedProps) { this._changedProps.put_Height(Common.Utils.Metric.fnRecalcToMM(this.spnHeight.getNumberValue())); this._changedProps.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); + this._changedProps.put_ResetCrop(true); } }, this)); diff --git a/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js index 3377621fd..d65d73515 100644 --- a/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ImageSettingsAdvanced.js @@ -72,6 +72,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem this.spinners = []; this._nRatio = 1; + this._isDefaultSize = false; this._originalProps = this.options.imageProps; }, @@ -100,6 +101,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem } this.spnHeight.setValue(h, true); } + this._isDefaultSize = false; }, this)); this.spinners.push(this.spnWidth); @@ -123,6 +125,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem } this.spnWidth.setValue(w, true); } + this._isDefaultSize = false; }, this)); this.spinners.push(this.spnHeight); @@ -133,6 +136,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem this.spnWidth.setValue(this.sizeOriginal.width, true); this.spnHeight.setValue(this.sizeOriginal.height, true); this._nRatio = this.sizeOriginal.width/this.sizeOriginal.height; + this._isDefaultSize = true; }, this)); this.btnRatio = new Common.UI.Button({ @@ -268,6 +272,7 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem if (this.spnWidth.getValue()!=='') properties.put_Width(Common.Utils.Metric.fnRecalcToMM(this.spnWidth.getNumberValue())); properties.asc_putLockAspect(this.btnRatio.pressed); + properties.put_ResetCrop(this._isDefaultSize); var Position = new Asc.CPosition(); if (this.spnX.getValue() !== '')