From 51c026e9d2c0e862bc280dcbafe53ae9f55c82b6 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 13 Jan 2023 17:30:11 +0700 Subject: [PATCH 01/17] =?UTF-8?q?=D0=9A=D0=BE=D1=81=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/Search.vue | 45 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 1d61712..57abbb3 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -908,7 +908,7 @@ class Search { onScroll() { const curScrollTop = this.$refs.scroller.scrollTop; - const toolpanelviewportoffset= this.$refs.toolPanel.getBoundingClientRect().top; + const toolPanelOffset = this.$refs.toolPanel.getBoundingClientRect().top; if (this.ignoreScrolling) { this.lastScrollTop = curScrollTop; @@ -917,45 +917,44 @@ class Search { return; } - - if (this.lastScrollTop==curScrollTop) return; //если событие вызвано более 1 раза на 1 скролл + if (this.lastScrollTop === curScrollTop) + return; //если событие вызвано более 1 раза на 1 скролл if (!this.lastScrollTop) this.lastScrollTop = 0; - if (curScrollTop - this.lastScrollTop > 0) { //страницу крутят вверх - if (this.$refs.toolPanel.style.position=="sticky") //Если блок приклеен к окну - this.$refs.toolPanel.style.top=`${curScrollTop}px`;//Приклеиваем его к позиции в родителе - this.$refs.toolPanel.style.position="relative"; - if (toolpanelviewportoffset<-this.$refs.toolPanel.offsetHeight) //Но не даём блоку оказаться дальше своей высоты за экраном - this.$refs.toolPanel.style.top = `${curScrollTop-this.$refs.toolPanel.offsetHeight}px`; - } else { - if (toolpanelviewportoffset>=0) - { - this.$refs.toolPanel.style.top="0px"; - this.$refs.toolPanel.style.position="sticky"; - - } - } + if (curScrollTop - this.lastScrollTop > 0) { //страницу крутят вверх + if (this.$refs.toolPanel.style.position == 'sticky') //если блок приклеен к окну + this.$refs.toolPanel.style.top = `${this.lastScrollTop}px`;//приклеиваем его к позиции в родителе + + this.$refs.toolPanel.style.position = 'relative'; + (async() => {//"отложенная" коректировка, из-за артефактов в firefox + if (toolPanelOffset < -this.$refs.toolPanel.offsetHeight) { //не даём блоку оказаться дальше своей высоты за экраном + await utils.sleep(10); + this.$refs.toolPanel.style.top = `${curScrollTop - this.$refs.toolPanel.offsetHeight}px`; + } + })(); + + } else if (toolPanelOffset >= 0) { + this.$refs.toolPanel.style.top = '0px'; + this.$refs.toolPanel.style.position = 'sticky'; + } + this.lastScrollTop = curScrollTop; - - } async ignoreScroll(ms = 300) { this.ignoreScrolling = true; await utils.sleep(ms); await this.$nextTick(); - await this.$nextTick(); - await this.$nextTick(); this.ignoreScrolling = false; } scrollToTop() { this.$refs.scroller.scrollTop = 0; this.lastScrollTop = 0; - this.$refs.toolPanel.style.top="0px"; - this.$refs.toolPanel.style.position="sticky"; + this.$refs.toolPanel.style.top = '0px'; + this.$refs.toolPanel.style.position = 'sticky'; } updatePageCount() { From e983db84babdde6b2a2c76aea89faafd16de6f4c Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 13 Jan 2023 17:35:36 +0700 Subject: [PATCH 02/17] CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ed7392..76aa6a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +1.5.0 / 2023-01-?? +------------------ + +- Исправление проблем скроллинга панели инструментов (#12) +- Улучшение отображения веб-интерфейса на мобильных устройствах + 1.4.1 / 2022-12-21 ------------------ From 302dd8eeb40dcc8a48b3e0be717dab85e48d7bea Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 13 Jan 2023 18:16:53 +0700 Subject: [PATCH 03/17] =?UTF-8?q?=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20?= =?UTF-8?q?=D1=80=D0=B0=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8=D1=82=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D0=BD=D0=B8=D0=B6=D0=BD=D1=8E=D1=8E=20=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/Search.vue | 28 ++++++++++++++-------------- client/components/share/DivBtn.vue | 5 ++++- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 57abbb3..5129938 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -56,18 +56,6 @@
- - - -
-
-
+ + + +
.button { position: relative; - box-shadow: 0.5px 1px 3px #333333; } .button:hover { From ab57dbfbe7ba12c7822649c5061656a20bc22702 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 13 Jan 2023 19:21:38 +0700 Subject: [PATCH 04/17] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=BC=D0=BE=D0=B1=D0=B8=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D1=85=20=D1=83=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D1=81=D1=82=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/Search.vue | 482 ++++++++++++++-------------- 1 file changed, 244 insertions(+), 238 deletions(-) diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 5129938..0183a7f 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -1,271 +1,277 @@