Fixing absolute positioning of Svelte scenes

This commit is contained in:
David Négrier 2021-06-01 17:07:56 +02:00
parent b04c438d6f
commit 9c9699d2d1
2 changed files with 19 additions and 5 deletions

View File

@ -21,7 +21,7 @@
export let game: Game;
</script>
<div>
<div class="absolute-overlay">
{#if $loginSceneVisibleStore}
<LoginScene game={game}></LoginScene>
{/if}
@ -34,9 +34,6 @@
{#if $selectCompanionSceneVisibleStore}
<SelectCompanionScene game={ game }></SelectCompanionScene>
{/if}
{#if $helpCameraSettingsVisibleStore}
<HelpCameraSettingsPopup game={ game }></HelpCameraSettingsPopup>
{/if}
{#if $enableCameraSceneVisibilityStore}
<EnableCameraScene game={game}></EnableCameraScene>
{/if}
@ -47,4 +44,19 @@
<MyCamera></MyCamera>
<CameraControls></CameraControls>
{/if}
{#if $helpCameraSettingsVisibleStore}
<HelpCameraSettingsPopup game={ game }></HelpCameraSettingsPopup>
{/if}
</div>
<style lang="scss">
.absolute-overlay {
position: absolute;
width: 100%;
height: 100%;
> & {
position: relative;
}
}
</style>

View File

@ -132,11 +132,13 @@
<style lang="scss">
.enableCameraScene {
position: absolute;
width: 100vw;
height: 100vh;
pointer-events: auto;
/*background: #000000;*/
margin: 20px auto 0;
color: #ebeeee;
height: 100vh;
overflow: auto;
/*max-height: 48vh;
width: 42vw;