diff --git a/js/_layer.js b/js/_layer.js index 1809165..0e6ffcc 100644 --- a/js/_layer.js +++ b/js/_layer.js @@ -76,12 +76,13 @@ class Layer { // Initializes the canvas initialize() { + /* var maxHorizontalZoom = Math.floor(window.innerWidth/this.canvasSize[0]*0.75); var maxVerticalZoom = Math.floor(window.innerHeight/this.canvasSize[1]*0.75); zoom = Math.min(maxHorizontalZoom,maxVerticalZoom); if (zoom < 1) zoom = 1; - + */ //resize canvas this.canvas.width = this.canvasSize[0]; this.canvas.height = this.canvasSize[1]; @@ -584,8 +585,6 @@ function addLayer(id, saveHistory = true) { newCanvas.style.zIndex = maxZIndex; newCanvas.classList.add("drawingCanvas"); - console.log("Tela creata: " + newCanvas); - if (!layerListEntry) return console.warn('skipping adding layer because no document'); // Clone the default layer @@ -604,7 +603,6 @@ function addLayer(id, saveHistory = true) { layers.splice(index, 0, newLayer); - // Insert it before the Add layer button layerList.insertBefore(toAppend, layerList.childNodes[0]); diff --git a/js/_variables.js b/js/_variables.js index 0cfcd89..03e29a9 100644 --- a/js/_variables.js +++ b/js/_variables.js @@ -1,5 +1,6 @@ //init variables -var canvasSize,zoom; +var canvasSize; +var zoom = 3; var dragging = false; var lastMouseClickPos = [0,0]; var dialogueOpen = false;