tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
wait for document load event to set css var
awarm.space
1 year ago
ec77efe0
b5832a3b
+5
-1
1 changed file
expand all
collapse all
unified
split
app
layout.tsx
+5
-1
app/layout.tsx
···
45
45
el.style.setProperty("--leaflet-height-unitless", window.innerHeight)
46
46
el.style.setProperty("--leaflet-width-unitless", window.innerWidth)
47
47
}
48
48
-
listener()
48
48
+
if (document.readyState === 'complete') {
49
49
+
listener();
50
50
+
} else {
51
51
+
document.addEventListener('DOMContentLoaded', listener);
52
52
+
}
49
53
window.addEventListener("resize", listener)
50
54
`,
51
55
}}