* [pve-devel] [PATCH widget-toolkit] fix autoscrolling on browser zoom
@ 2020-09-30 12:04 Dominik Csapak
2020-10-01 4:11 ` [pve-devel] applied: " Dietmar Maurer
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-09-30 12:04 UTC (permalink / raw)
To: pve-devel
when browser zoom is activated, our scrollposition can be a little bit off
increase the boundary by a few pixels (5px are ~1/3 of a line)
so that the auto-scrolling still works
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/panel/JournalView.js | 6 +++---
src/panel/LogView.js | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/panel/JournalView.js b/src/panel/JournalView.js
index b81cc45..692f241 100644
--- a/src/panel/JournalView.js
+++ b/src/panel/JournalView.js
@@ -51,7 +51,7 @@ Ext.define('Proxmox.panel.JournalView', {
if (!livemode) {
setTimeout(function() { view.scrollTo(0, 0); }, 10);
- } else if (view.scrollToEnd && scrollPos <= 0) {
+ } else if (view.scrollToEnd && scrollPos <= 5) {
setTimeout(function() { view.scrollTo(0, Infinity); }, 10);
} else if (!view.scrollToEnd && scrollPosTop < 20 * view.lineHeight) {
setTimeout(function() { view.scrollTo(0, (num * view.lineHeight) + scrollPosTop); }, 10);
@@ -170,7 +170,7 @@ Ext.define('Proxmox.panel.JournalView', {
if (me.scrollPosTop() < 20*view.lineHeight) {
view.scrollToEnd = false;
view.loadTask.delay(200, undefined, undefined, [true, true]);
- } else if (me.scrollPosBottom() <= 1) {
+ } else if (me.scrollPosBottom() <= 5) {
view.scrollToEnd = true;
}
},
@@ -199,7 +199,7 @@ Ext.define('Proxmox.panel.JournalView', {
return;
}
- if (me.scrollPosBottom() <= 1) {
+ if (me.scrollPosBottom() <= 5) {
view.loadTask.delay(200, undefined, undefined, [true, false]);
}
},
diff --git a/src/panel/LogView.js b/src/panel/LogView.js
index 1ce83bc..1772737 100644
--- a/src/panel/LogView.js
+++ b/src/panel/LogView.js
@@ -65,7 +65,7 @@ Ext.define('Proxmox.panel.LogView', {
content.update(text);
- if (view.scrollToEnd && scrollPos <= 0) {
+ if (view.scrollToEnd && scrollPos <= 5) {
// we use setTimeout to work around scroll handling on touchscreens
setTimeout(function() { view.scrollTo(0, Infinity); }, 10);
}
@@ -167,7 +167,7 @@ Ext.define('Proxmox.panel.LogView', {
return;
}
- if (me.scrollPosBottom() <= 1) {
+ if (me.scrollPosBottom() <= 5) {
view.loadTask.delay(200);
}
},
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH widget-toolkit] fix autoscrolling on browser zoom
2020-09-30 12:04 [pve-devel] [PATCH widget-toolkit] fix autoscrolling on browser zoom Dominik Csapak
@ 2020-10-01 4:11 ` Dietmar Maurer
0 siblings, 0 replies; 2+ messages in thread
From: Dietmar Maurer @ 2020-10-01 4:11 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-01 4:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 12:04 [pve-devel] [PATCH widget-toolkit] fix autoscrolling on browser zoom Dominik Csapak
2020-10-01 4:11 ` [pve-devel] applied: " Dietmar Maurer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal