Skip to content

Commit 0ef49e1

Browse files
authored
docs: Fix control panel height on mobile (#1327)
1 parent a5d958d commit 0ef49e1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

apps/typegpu-docs/src/components/ExampleView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function ExampleView({ example }: Props) {
9898
<div className='flex h-full flex-col gap-4 md:grid md:grid-cols-[1fr_18.75rem]'>
9999
<div
100100
className={cs(
101-
'grid flex-1 gap-4',
101+
'grid flex-1 gap-4 overflow-auto',
102102
codeEditorShowing ? 'md:grid-rows-[2fr_3fr]' : '',
103103
)}
104104
>
@@ -109,13 +109,13 @@ export function ExampleView({ example }: Props) {
109109
scrollbarGutter: 'stable both-edges',
110110
}}
111111
className={cs(
112-
'relative box-border flex h-full flex-col flex-wrap items-center justify-evenly md:flex-row md:gap-4',
112+
'relative box-border flex h-full flex-col flex-wrap items-center justify-evenly gap-4 overflow-auto md:flex-row',
113113
codeEditorShowing
114114
? 'md:max-h-[calc(40vh-1.25rem)] md:overflow-auto'
115115
: '',
116116
)}
117117
>
118-
<div ref={exampleHtmlRef} className='contents h-full w-full' />
118+
<div ref={exampleHtmlRef} className='contents' />
119119
</div>
120120
)
121121
: <GPUUnsupportedPanel />}

apps/typegpu-docs/src/content/examples/image-processing/blur/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function render() {
295295
device.queue.submit([encoder.finish()]);
296296
}
297297

298-
render();
298+
setTimeout(() => render(), 100);
299299

300300
// #region Example controls & Cleanup
301301

apps/typegpu-docs/src/content/examples/simple/triangle/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ setTimeout(() => {
6363
storeOp: 'store',
6464
})
6565
.draw(3);
66+
}, 100);
6667

68+
export function onCleanup() {
6769
root.destroy();
68-
}, 100);
70+
}

0 commit comments

Comments
 (0)