mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 20:29:58 +02:00
refactor: Improve lazy loading for images in ZenSidebarManager.mjs
This commit is contained in:
parent
f5d5bc918b
commit
43c47ad710
1 changed files with 2 additions and 1 deletions
|
@ -73,7 +73,8 @@ var gZenBrowserManagerSidebar = {
|
||||||
const parent = sidebar.parentElement;
|
const parent = sidebar.parentElement;
|
||||||
// relative to avoid the top margin
|
// relative to avoid the top margin
|
||||||
// 20px is the padding
|
// 20px is the padding
|
||||||
let parentRelativeHeight = parent.getBoundingClientRect().height - parent.getBoundingClientRect().top + 30;
|
let parentRelativeHeight = parent.getBoundingClientRect().height - parent.getBoundingClientRect().top
|
||||||
|
+ sidebar.getBoundingClientRect().top - 20;
|
||||||
let minHeight = parseInt(computedStyle.getPropertyValue("min-height").replace("px", ""));
|
let minHeight = parseInt(computedStyle.getPropertyValue("min-height").replace("px", ""));
|
||||||
if (!this._isDragging) { // Prevent multiple resizes
|
if (!this._isDragging) { // Prevent multiple resizes
|
||||||
this._isDragging = true;
|
this._isDragging = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue