reset files to before desktop config, added more ui cleanup, store classes, examples
This commit is contained in:
47
src/ui/CubeInputSet.svelte
Normal file
47
src/ui/CubeInputSet.svelte
Normal file
@@ -0,0 +1,47 @@
|
||||
<script lang="ts">
|
||||
import CubeInput from "./CubeInput.svelte";
|
||||
import {polycubes, somaDimX, somaDimY, somaDimZ} from "../store";
|
||||
|
||||
export let numCubes;
|
||||
$: numCubes = $polycubes.length;
|
||||
|
||||
window.addEventListener("keypress", () => {
|
||||
for (const cube of $polycubes) {
|
||||
console.log({
|
||||
name: "",
|
||||
dimX: $somaDimX,
|
||||
dimY: $somaDimY,
|
||||
dimZ: $somaDimZ,
|
||||
cubes: $polycubes.map(cube => ({space: cube.getRaw(), color: cube.getColor()})),
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
{#each {length: numCubes} as _, cubeNo}
|
||||
<div class="cube-input">
|
||||
<div class="padder">
|
||||
<CubeInput
|
||||
cubeNo={cubeNo}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.padder {
|
||||
padding: 1em;
|
||||
}
|
||||
.cube-input {
|
||||
margin: auto;
|
||||
}
|
||||
.container {
|
||||
flex: 1 1 auto;
|
||||
overflow-x: scroll;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user