From 52e279f4437f597615cb450b61d21d558b5ace63 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 23 Jan 2025 19:08:58 +0100 Subject: fix auto save draft not set correctly and use round instead of ceil for cover height calculation --- view/tpl/cover_photo_widget.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/cover_photo_widget.tpl b/view/tpl/cover_photo_widget.tpl index e26bd607f..306dfe0b5 100644 --- a/view/tpl/cover_photo_widget.tpl +++ b/view/tpl/cover_photo_widget.tpl @@ -18,7 +18,7 @@ // Otherwise, set up the cover photo's size coverPhoto.classList.remove('d-none'); - coverHeight = Math.ceil(window.innerWidth / 2.75862069); + coverHeight = Math.round(window.innerWidth / 2.75862069); coverPhoto.style.height = `${coverHeight}px`; datasrc2src('#cover-photo > img'); @@ -50,7 +50,7 @@ window.addEventListener('resize', function() { if (!coverPhoto) return; - coverHeight = Math.ceil(window.innerWidth / 2.75862069); + coverHeight = Math.round(window.innerWidth / 2.75862069); coverPhoto.style.height = `${coverHeight}px`; if (window.innerWidth < 755) { -- cgit v1.2.3