From fb7b9c602cd65abcd00a122709e0773d475ac7b0 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 23 Jan 2024 09:58:30 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E5=9B=9E=E9=80=80=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/watermark/watermark.ts | 14 +++++++------- de-xpack | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/core-frontend/src/components/watermark/watermark.ts b/core/core-frontend/src/components/watermark/watermark.ts index 9cf773c60d..7e185e84ee 100644 --- a/core/core-frontend/src/components/watermark/watermark.ts +++ b/core/core-frontend/src/components/watermark/watermark.ts @@ -41,17 +41,17 @@ export function watermark(settings, domId) { // 如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔 if ( defaultSettings.watermark_cols === 0 || - Math.round( + Math.floor( defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1) ) > page_width ) { - defaultSettings.watermark_cols = Math.round( + defaultSettings.watermark_cols = Math.floor( (page_width - defaultSettings.watermark_x + defaultSettings.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings.watermark_x_space) ) - defaultSettings.watermark_x_space = Math.round( + defaultSettings.watermark_x_space = Math.floor( (page_width - defaultSettings.watermark_x - defaultSettings.watermark_width * defaultSettings.watermark_cols) / @@ -61,17 +61,17 @@ export function watermark(settings, domId) { // 如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔 if ( defaultSettings.watermark_rows === 0 || - Math.round( + Math.floor( defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1) ) > page_height ) { - defaultSettings.watermark_rows = Math.round( + defaultSettings.watermark_rows = Math.floor( (defaultSettings.watermark_y_space + page_height - defaultSettings.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space) ) - defaultSettings.watermark_y_space = Math.round( + defaultSettings.watermark_y_space = Math.floor( (page_height - defaultSettings.watermark_y - defaultSettings.watermark_height * defaultSettings.watermark_rows) / @@ -110,7 +110,7 @@ export function watermark(settings, domId) { mask_div.style.zIndex = '10' // 让水印不遮挡页面的点击事件 mask_div.style.pointerEvents = 'none' - mask_div.style.opacity = defaultSettings.watermark_alpha + '' + mask_div.style.opacity = defaultSettings.watermark_alpha mask_div.style.fontSize = defaultSettings.watermark_fontsize mask_div.style.fontFamily = defaultSettings.watermark_font mask_div.style.color = defaultSettings.watermark_color diff --git a/de-xpack b/de-xpack index 19d1cc14aa..a30164b304 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 19d1cc14aaa7ff5297ebe8f3b8ea3c706f164cc3 +Subproject commit a30164b304688249585d2d9af53502a3a67211d2