diff --git a/css/index.css b/css/index.css index e57686e..54843d5 100644 --- a/css/index.css +++ b/css/index.css @@ -2,8 +2,16 @@ font-size: 100%; font-family: Arial, Helvetica, sans-serif; } + +/* Body is stuck with no scroll */ body { + width: 100%; + height: 100%; + margin: 0px; + padding: 0px; + + overflow: clip; } .container { diff --git a/css/layers.css b/css/layers.css new file mode 100644 index 0000000..2041088 --- /dev/null +++ b/css/layers.css @@ -0,0 +1,6 @@ +/* Debug floating window */ +#layer-preview .preview-canvas { + background-color: white; + width: 100%; + height: 150px; +} diff --git a/index.html b/index.html index dffa80b..6b65649 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,8 @@ + + @@ -189,6 +191,17 @@
+ +
+
Layer Debug View
+ +
+
{ + const layer = { + id: guid(), + name: layer, + // This is where black magic starts + // A proxy for the canvas object + canvas: new Proxy(document.createElement("canvas"), {}), + }; + }, + + // Deletes a layer + deleteLayer: (layer) => { + if (typeof layer === "object") { + layers._layers = layers._layers.filter((l) => l.id === layer.id); + delete layers[layer.id]; + } else if (typeof layer === "string") { + layers._layers = layers._layers.filter((l) => l.id === layer); + delete layers[layer]; + } + }, +};