From e7bf106306a148cb368f4fa6b46ddc2556567908 Mon Sep 17 00:00:00 2001 From: Konstantin Kireyev Date: Wed, 3 Apr 2024 15:12:15 +0500 Subject: [PATCH] [de,pe,pdfe] minify zoom check record --- apps/documenteditor/main/app/controller/Main.js | 6 +----- apps/pdfeditor/main/app/controller/Main.js | 6 +----- apps/presentationeditor/main/app/controller/Main.js | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 444fc7d21f..da069099f3 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -1247,11 +1247,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); } value = Common.localStorage.getItem("de-show-hiddenchars"); diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index 5c75e7304b..16fb7222a0 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -956,11 +956,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 5fd7df29d4..933d790be5 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -867,11 +867,7 @@ define([ this.api.zoomFitToWidth(); } } else { - if (zf > 0) { - this.api.zoom(zf); - } else { - this.api.zoom(100); - } + this.api.zoom(zf > 0 ? zf : 100); }