From 0a9cbba0c0ab8c229055c6a9dbed8680e4201aa4 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 31 Jan 2020 16:36:27 +0300 Subject: [PATCH] [DE] Fix Bug 44021 --- .../main/app/view/PageMarginsDialog.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/view/PageMarginsDialog.js b/apps/documenteditor/main/app/view/PageMarginsDialog.js index 60ca60465..7f06d50a1 100644 --- a/apps/documenteditor/main/app/view/PageMarginsDialog.js +++ b/apps/documenteditor/main/app/view/PageMarginsDialog.js @@ -248,15 +248,23 @@ define([ this.properties.put_LeftMargin(Common.Utils.Metric.fnRecalcToMM(record.value ? this.spnBottom.getNumberValue() : this.spnTop.getNumberValue())); this.properties.put_RightMargin(Common.Utils.Metric.fnRecalcToMM(record.value ? this.spnTop.getNumberValue() : this.spnBottom.getNumberValue())); + var h = this.properties.get_H(); + this.properties.put_H(this.properties.get_W()); + this.properties.put_W(h); + this.properties.put_Orientation(record.value); + + this.maxMarginsH = Common.Utils.Metric.fnRecalcFromMM(this.properties.get_H() - 2.6); + this.maxMarginsW = Common.Utils.Metric.fnRecalcFromMM(this.properties.get_W() - 12.7); + this.spnTop.setMaxValue(this.maxMarginsH); + this.spnBottom.setMaxValue(this.maxMarginsH); + this.spnLeft.setMaxValue(this.maxMarginsW); + this.spnRight.setMaxValue(this.maxMarginsW); + this.spnTop.setValue(Common.Utils.Metric.fnRecalcFromMM(this.properties.get_TopMargin()), true); this.spnBottom.setValue(Common.Utils.Metric.fnRecalcFromMM(this.properties.get_BottomMargin()), true); this.spnLeft.setValue(Common.Utils.Metric.fnRecalcFromMM(this.properties.get_LeftMargin()), true); this.spnRight.setValue(Common.Utils.Metric.fnRecalcFromMM(this.properties.get_RightMargin()), true); - var h = this.properties.get_H(); - this.properties.put_H(this.properties.get_W()); - this.properties.put_W(h); - this.properties.put_Orientation(record.value); this.api.SetDrawImagePreviewMargins('page-margins-preview', this.properties); } }