Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+7 -1
View File
@@ -20,7 +20,7 @@
import { state } from '../state.js';
import { canvasCoords } from '../canvas-coords.js';
export function createWandTool({ activeLayer, saveState, composite, wandHits, runMagicWand }) {
export function createWandTool({ activeLayer, saveState, composite, wandHits, runMagicWand, deselectSelection }) {
return {
click(e) {
const layer = activeLayer();
@@ -33,9 +33,15 @@ export function createWandTool({ activeLayer, saveState, composite, wandHits, ru
else if (e.altKey) mode = 'subtract';
// Click INSIDE the existing selection with no modifier → deselect.
if (mode === 'replace' && wandHits(coords.x, coords.y)) {
if (deselectSelection) {
deselectSelection();
return;
}
saveState();
state.wandMask = null;
state.wandLayerId = null;
state.wandMaskSpace = 'layer';
state.selectionSource = null;
state.wandLastSeed = null;
composite();
return;