Fix a stray misplaced height that seemingly tripped iOS safari on device but not in sim?
This commit is contained in:
parent
e3856c0984
commit
4a33262da0
2 changed files with 4 additions and 4 deletions
|
|
@ -14,11 +14,12 @@ export default function ViewerPanel({className, style}: {className?: string, sty
|
|||
|
||||
return (
|
||||
<div className={className}
|
||||
style={{display: 'flex', flexDirection: 'column',
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
flex: 1,
|
||||
position: 'relative',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
...(style ?? {})
|
||||
}}>
|
||||
{state.output?.stlFileURL &&
|
||||
|
|
|
|||
|
|
@ -91,8 +91,7 @@ export function formatMillis(n: number) {
|
|||
// https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8
|
||||
export function registerCustomAppHeightCSSProperty() {
|
||||
const updateAppHeight = () => {
|
||||
const doc = document.documentElement
|
||||
doc.style.setProperty('--app-height', `${window.innerHeight}px`)
|
||||
document.documentElement.style.setProperty('--app-height', `${window.innerHeight}px`)
|
||||
}
|
||||
window.addEventListener('resize', updateAppHeight)
|
||||
updateAppHeight();
|
||||
|
|
|
|||
Loading…
Reference in a new issue