From 1eb7f1d06798b3a3455817dfcd1876febd3eca89 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 18 Feb 2026 16:32:21 +0100 Subject: fix(mq_editor): exclude below-keep partials from hit-test selection Co-Authored-By: Claude Sonnet 4.6 --- tools/mq_editor/viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/mq_editor/viewer.js b/tools/mq_editor/viewer.js index c99d344..723a585 100644 --- a/tools/mq_editor/viewer.js +++ b/tools/mq_editor/viewer.js @@ -169,7 +169,7 @@ class SpectrogramViewer { hitTestPartial(x, y) { const THRESH = 10; let bestIdx = -1, bestDist = THRESH; - for (let p = 0; p < this.partials.length; ++p) { + for (let p = 0; p < this.partials.length && p < this.keepCount; ++p) { const curve = this.partials[p].freqCurve; if (!curve) continue; for (let i = 0; i <= 50; ++i) { -- cgit v1.2.3