diff --git a/frontend/src/sections/Editor2D.svelte b/frontend/src/sections/Editor2D.svelte index 2ce0847..ed005d2 100644 --- a/frontend/src/sections/Editor2D.svelte +++ b/frontend/src/sections/Editor2D.svelte @@ -139,12 +139,6 @@ ctx.drawImage(file.canvas.canvas, offsetX, offsetY) ctx.restore() - // Draw our selection overlay. - if (file.selection.active) { - ctx.imageSmoothingEnabled = false - ctx.drawImage(file.selection.marchingCanvas, offsetX*zoom, offsetY*zoom) - } - // FIXME: Reorganize overlay drawing to have two types: regular composition, such as this pixel brush preview, and difference composition for cursors and bounding boxes. // Draw brush preview. if (currentTool instanceof BrushTool) { @@ -203,6 +197,12 @@ ctx.stroke() } + // Draw our selection overlay. + if (file.selection.active) { + ctx.imageSmoothingEnabled = false + ctx.drawImage(file.selection.marchingCanvas, offsetX*zoom, offsetY*zoom) + } + // Draw our overlay with difference composition so visibility is better. ctx.save() ctx.globalCompositeOperation = 'difference'