diff options
author | Mario Vavti <mario@mariovavti.com> | 2025-01-23 19:08:58 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2025-01-23 19:08:58 +0100 |
commit | 52e279f4437f597615cb450b61d21d558b5ace63 (patch) | |
tree | 620f22e1dabfc962d348c06bbbdcdc5a047de65c /view/tpl | |
parent | 4efa8536906735864a96c6609d0a09d7bf2c320b (diff) | |
download | volse-hubzilla-52e279f4437f597615cb450b61d21d558b5ace63.tar.gz volse-hubzilla-52e279f4437f597615cb450b61d21d558b5ace63.tar.bz2 volse-hubzilla-52e279f4437f597615cb450b61d21d558b5ace63.zip |
fix auto save draft not set correctly and use round instead of ceil for cover height calculation
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/cover_photo_widget.tpl | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |