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)}
|
||||
bind:this={graphState.wrapper}
|
||||
class="graph-wrapper"
|
||||
style="height: 100vh;"
|
||||
class:is-panning={graphState.isPanning}
|
||||
class:is-hovering={graphState.hoveredNodeId !== -1}
|
||||
aria-label="Graph"
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
<SmallPerformanceViewer {fps} store={perf} />
|
||||
{/if}
|
||||
|
||||
<div style="height: 100vh">
|
||||
<Canvas>
|
||||
<Scene
|
||||
bind:this={sceneComponent}
|
||||
@@ -104,3 +105,4 @@
|
||||
bind:fps
|
||||
/>
|
||||
</Canvas>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user