Adjust reactive canvas creation to only work if open
parent
2bfab2f3da
commit
33c36990e2
|
@ -19,15 +19,17 @@
|
||||||
export let open: boolean = false
|
export let open: boolean = false
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
canvas = new Canvas(width, height)
|
if (open) {
|
||||||
canvas.addNewPaletteColor(0, 0, 0, 0)
|
canvas = new Canvas(width, height)
|
||||||
|
canvas.addNewPaletteColor(0, 0, 0, 0)
|
||||||
|
canvas.isIndexed = indexed
|
||||||
|
file = data.StackistFileV1.createFrom({
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
groups: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$: canvas.isIndexed = indexed
|
|
||||||
$: file = data.StackistFileV1.createFrom({
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
groups: {}
|
|
||||||
})
|
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
canvas = new Canvas(width, height)
|
canvas = new Canvas(width, height)
|
||||||
|
|
Loading…
Reference in New Issue