Draw selection overlay later
parent
33c36990e2
commit
17e0b41b2d
|
@ -139,12 +139,6 @@
|
||||||
ctx.drawImage(file.canvas.canvas, offsetX, offsetY)
|
ctx.drawImage(file.canvas.canvas, offsetX, offsetY)
|
||||||
ctx.restore()
|
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.
|
// 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.
|
// Draw brush preview.
|
||||||
if (currentTool instanceof BrushTool) {
|
if (currentTool instanceof BrushTool) {
|
||||||
|
@ -203,6 +197,12 @@
|
||||||
ctx.stroke()
|
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.
|
// Draw our overlay with difference composition so visibility is better.
|
||||||
ctx.save()
|
ctx.save()
|
||||||
ctx.globalCompositeOperation = 'difference'
|
ctx.globalCompositeOperation = 'difference'
|
||||||
|
|
Loading…
Reference in New Issue