feat: resize canvases to fit window height
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m3s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m3s
Closes #16 The canvases fit their parents size, so adding a wrapper with 100vh solved it. https://threlte.xyz/docs/reference/core/canvas#size
This commit is contained in:
@@ -105,6 +105,7 @@
|
|||||||
onwheel={(ev) => mouseEvents.handleMouseScroll(ev)}
|
onwheel={(ev) => mouseEvents.handleMouseScroll(ev)}
|
||||||
bind:this={graphState.wrapper}
|
bind:this={graphState.wrapper}
|
||||||
class="graph-wrapper"
|
class="graph-wrapper"
|
||||||
|
style="height: 100vh;"
|
||||||
class:is-panning={graphState.isPanning}
|
class:is-panning={graphState.isPanning}
|
||||||
class:is-hovering={graphState.hoveredNodeId !== -1}
|
class:is-hovering={graphState.hoveredNodeId !== -1}
|
||||||
aria-label="Graph"
|
aria-label="Graph"
|
||||||
|
|||||||
@@ -95,12 +95,14 @@
|
|||||||
<SmallPerformanceViewer {fps} store={perf} />
|
<SmallPerformanceViewer {fps} store={perf} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<Canvas>
|
<div style="height: 100vh">
|
||||||
<Scene
|
<Canvas>
|
||||||
bind:this={sceneComponent}
|
<Scene
|
||||||
{lines}
|
bind:this={sceneComponent}
|
||||||
{centerCamera}
|
{lines}
|
||||||
bind:scene
|
{centerCamera}
|
||||||
bind:fps
|
bind:scene
|
||||||
/>
|
bind:fps
|
||||||
</Canvas>
|
/>
|
||||||
|
</Canvas>
|
||||||
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user