aboutsummaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-22 23:30:45 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-23 00:45:30 +1100
commitb700d1ae15e0a5380eaf7cc677a3abf17620d5d4 (patch)
tree578336faaaed55fc2d72f0d0d3a1c9d80e467792 /src/util.ts
parentd28324f9b716baaaa76cc3a9e2cdf1d54d6040d1 (diff)
Replace ResizeObserver using width/height props
For increasing compatibility with older devices
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts11
1 files changed, 0 insertions, 11 deletions
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