diff options
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,6 +1,5 @@ let canvas; let ctx; -let imports; let settings = { brightness: {}, saturate: {}, @@ -13,7 +12,7 @@ const img = new Image(); document.addEventListener("DOMContentLoaded", function() { canvas = document.getElementById("myCanvas"); ctx = canvas.getContext("2d"); - imports = document.getElementById("imports"); + document.getElementById("back").addEventListener("click", () => document.body.classList.remove("editor-enabled")); // bind listeners document.getElementById("take-picture").addEventListener("click", take_picture); @@ -38,14 +37,13 @@ document.addEventListener("DOMContentLoaded", function() { }) function take_picture() { - canvas.classList.remove("is-hidden"); - imports.classList.add("is-hidden"); + document.body.classList.add("editor-enabled"); } function upload_image() { - canvas.classList.remove("is-hidden"); - imports.classList.add("is-hidden"); + document.body.classList.add("editor-enabled"); + console.log(this.files[0]); img.src = URL.createObjectURL(this.files[0]); |