ÿØÿà JFIF ` ` ÿáfExif MM * i >ê 2 ê ê P ê ÿþ ?CREATOR: gd-jpeg v1.0 (usi
|
Server : Apache System : Linux gains.enterpriseappscloud.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : beyondlimi ( 2438) PHP Version : 7.4.33 Disable Function : allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo Directory : /home/beyondlimi/public_html/admin/assets/libs/simplebar/src/ |
Upload File : |
import canUseDOM from 'can-use-dom';
import { getElementDocument } from "./helpers";
let cachedScrollbarWidth = null;
let cachedDevicePixelRatio = null;
if (canUseDOM) {
window.addEventListener('resize', () => {
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
cachedDevicePixelRatio = window.devicePixelRatio;
cachedScrollbarWidth = null;
}
});
}
export default function scrollbarWidth(el) {
if (cachedScrollbarWidth === null) {
const document = getElementDocument(el);
if (typeof document === 'undefined') {
cachedScrollbarWidth = 0;
return cachedScrollbarWidth;
}
const body = document.body;
const box = document.createElement('div');
box.classList.add('simplebar-hide-scrollbar');
body.appendChild(box);
const width = box.getBoundingClientRect().right;
body.removeChild(box);
cachedScrollbarWidth = width;
}
return cachedScrollbarWidth;
}