Skip to content

Commit

Permalink
Change margin presets for us/ca region
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Sep 16, 2024
1 parent 41b3c18 commit 3112277
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/documenteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1861,6 +1861,7 @@ define([

if (/^(ca|us)$/i.test(region))
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
Common.Utils.InternalSettings.set("de-config-region", region);
},

onDocModeApply: function(mode, force, disableModeButton) {// force !== true - change mode only if not in view mode, disableModeButton: disable or not DocMode button in the header
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -2827,7 +2827,7 @@ define([], function () {
takeFocusOnClose: true,
cls: 'input-group-nr',
data: [
{ value: 0, displayValue: this.textMarginsNormal, size: [20, 30, 20, 15]},
{ value: 0, displayValue: this.textMarginsNormal, size: (/^(ca|us)$/i.test(Common.Utils.InternalSettings.get("de-config-region"))) ? [25.4, 25.4, 25.4, 25.4] : [20, 30, 20, 15]},
{ value: 2, displayValue: this.textMarginsNarrow, size: [12.7, 12.7, 12.7, 12.7]},
{ value: 3, displayValue: this.textMarginsModerate, size: [25.4, 19.1, 25.4, 19.1]},
{ value: 4, displayValue: this.textMarginsWide, size: [25.4, 50.8, 25.4, 50.8]},
Expand Down
2 changes: 1 addition & 1 deletion apps/documenteditor/main/app/view/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ define([
checkable: true,
template: pageMarginsTemplate,
toggleGroup: 'menuPageMargins',
value: [20, 30, 20, 15]
value: (/^(ca|us)$/i.test(Common.Utils.InternalSettings.get("de-config-region"))) ? [25.4, 25.4, 25.4, 25.4] : [20, 30, 20, 15]
},
{
caption: this.textMarginsNarrow,
Expand Down
1 change: 1 addition & 0 deletions apps/pdfeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,7 @@ define([

if (/^(ca|us)$/i.test(region))
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
Common.Utils.InternalSettings.set("pdfe-config-region", region);
},

onPdfModeApply: function(mode) {
Expand Down
2 changes: 1 addition & 1 deletion apps/pdfeditor/main/app/view/FileMenuPanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -2592,7 +2592,7 @@ define([], function () {
takeFocusOnClose: true,
cls: 'input-group-nr',
data: [
{ value: 0, displayValue: this.textMarginsNormal, size: [20, 30, 20, 15]},
{ value: 0, displayValue: this.textMarginsNormal, size: (/^(ca|us)$/i.test(Common.Utils.InternalSettings.get("pdfe-config-region"))) ? [25.4, 25.4, 25.4, 25.4] : [20, 30, 20, 15]},
{ value: 2, displayValue: this.textMarginsNarrow, size: [12.7, 12.7, 12.7, 12.7]},
{ value: 3, displayValue: this.textMarginsModerate, size: [25.4, 19.1, 25.4, 19.1]},
{ value: 4, displayValue: this.textMarginsWide, size: [25.4, 50.8, 25.4, 50.8]},
Expand Down

0 comments on commit 3112277

Please sign in to comment.