Draw selection overlay later
parent
33c36990e2
commit
17e0b41b2d
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue