Displaying of table scrolling optimized
This commit is contained in:
@@ -765,6 +765,8 @@ body.asset-list-scroll-page #asset-table-scroll{
|
||||
overflow-x:auto;
|
||||
overflow-y:auto;
|
||||
overscroll-behavior:contain;
|
||||
/* v0.5.5.91: reduce repaint pressure during horizontal and vertical scroll. */
|
||||
will-change:scroll-position;
|
||||
}
|
||||
|
||||
/* The older containment rule prevents reliable scroll sizing in this layout. */
|
||||
@@ -3252,6 +3254,8 @@ html[data-theme="dark"] .advanced-filter-popup select,html[data-theme="dark"] .a
|
||||
min-height:0;
|
||||
overflow:auto;
|
||||
overscroll-behavior:contain;
|
||||
/* v0.5.5.91: keep scrolling on the compositor path where possible. */
|
||||
will-change:scroll-position;
|
||||
border:1px solid var(--am-border,#d8dde2);
|
||||
border-radius:6px;
|
||||
background:var(--am-surface,#fff);
|
||||
|
||||
@@ -134,20 +134,39 @@
|
||||
applyHidden();
|
||||
}
|
||||
|
||||
let syncing = false;
|
||||
scroll?.addEventListener('scroll', () => {
|
||||
if (syncing || !topScroll) return;
|
||||
syncing = true;
|
||||
topScroll.scrollLeft = scroll.scrollLeft;
|
||||
syncing = false;
|
||||
}, { passive: true });
|
||||
// Keep the optional top scrollbar synchronized without forcing a second
|
||||
// scroll-position write for every native scroll event. Fast horizontal
|
||||
// scrolling can emit several events within one paint cycle; coalescing
|
||||
// them into one animation frame reduces Chromium repaint/compositor work.
|
||||
let scrollSyncFrame = 0;
|
||||
let scrollSyncSource = null;
|
||||
|
||||
topScroll?.addEventListener('scroll', () => {
|
||||
if (syncing || !scroll) return;
|
||||
syncing = true;
|
||||
scroll.scrollLeft = topScroll.scrollLeft;
|
||||
syncing = false;
|
||||
}, { passive: true });
|
||||
function scheduleScrollSync(source) {
|
||||
scrollSyncSource = source;
|
||||
if (scrollSyncFrame) return;
|
||||
|
||||
scrollSyncFrame = requestAnimationFrame(() => {
|
||||
scrollSyncFrame = 0;
|
||||
const sourceElement = scrollSyncSource;
|
||||
scrollSyncSource = null;
|
||||
|
||||
if (sourceElement === scroll && topScroll) {
|
||||
if (topScroll.scrollLeft !== scroll.scrollLeft) {
|
||||
topScroll.scrollLeft = scroll.scrollLeft;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (sourceElement === topScroll && scroll) {
|
||||
if (scroll.scrollLeft !== topScroll.scrollLeft) {
|
||||
scroll.scrollLeft = topScroll.scrollLeft;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
scroll?.addEventListener('scroll', () => scheduleScrollSync(scroll), { passive: true });
|
||||
topScroll?.addEventListener('scroll', () => scheduleScrollSync(topScroll), { passive: true });
|
||||
|
||||
headers().forEach(th => {
|
||||
th.addEventListener('contextmenu', event => {
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
APP_VERSION = "0.5.5.90"
|
||||
APP_VERSION = "0.5.5.91"
|
||||
__version__ = APP_VERSION
|
||||
|
||||
Reference in New Issue
Block a user