mirror of
https://github.com/tenrok/OverlayScrollbars.git
synced 2026-06-20 16:30:36 +03:00
small size observer improvements
This commit is contained in:
@@ -64,8 +64,8 @@ export const createSizeObserver = (
|
|||||||
const onSizeChangedCallbackProxy = (sizeChangedContext?: Cache<CSSDirection> | SizeObserverEntry[] | Event) => {
|
const onSizeChangedCallbackProxy = (sizeChangedContext?: Cache<CSSDirection> | SizeObserverEntry[] | Event) => {
|
||||||
const directionCacheValue = sizeChangedContext && (sizeChangedContext as Cache<CSSDirection>)._value;
|
const directionCacheValue = sizeChangedContext && (sizeChangedContext as Cache<CSSDirection>)._value;
|
||||||
|
|
||||||
let skip: boolean = false;
|
let skip = false;
|
||||||
let doDirectionScroll = true; // always true if sizeChangedContext is Event
|
let doDirectionScroll = true; // always true if sizeChangedContext is Event (appear callback or RO. Polyfill)
|
||||||
|
|
||||||
// if triggered from RO.
|
// if triggered from RO.
|
||||||
if (isArray(sizeChangedContext) && sizeChangedContext.length > 0) {
|
if (isArray(sizeChangedContext) && sizeChangedContext.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user