From b700d1ae15e0a5380eaf7cc677a3abf17620d5d4 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 22 Jan 2023 23:30:45 +1100 Subject: Replace ResizeObserver using width/height props For increasing compatibility with older devices --- src/util.ts | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/util.ts') diff --git a/src/util.ts b/src/util.ts index ea9e76e..96741b2 100644 --- a/src/util.ts +++ b/src/util.ts @@ -22,17 +22,6 @@ export function onTouchDevice(){ return window.matchMedia('(pointer: coarse)').matches; } -// For detecting writing mode - // Used with ResizeObserver callbacks, to determine which resized dimensions are width and height -export let WRITING_MODE_HORZ = true; - -if ('writing-mode' in window.getComputedStyle(document.body)){ // Can be null when testing - const bodyStyles = window.getComputedStyle(document.body); - if ('writing-mode' in bodyStyles){ - WRITING_MODE_HORZ = (bodyStyles['writing-mode'] as string).startsWith('horizontal'); - } -} - // ========== For handler throttling ========== // For creating throttled version of handler function -- cgit v1.2.3