summaryrefslogtreecommitdiff
path: root/tools/mq_editor
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-18 16:32:21 +0100
committerskal <pascal.massimino@gmail.com>2026-02-18 16:32:21 +0100
commit1eb7f1d06798b3a3455817dfcd1876febd3eca89 (patch)
treeb0e3bcad3b77d1a7e8bc50343c70fe492c97e103 /tools/mq_editor
parentbc07ea00a9f2f418e6b460884c3925b72ff2a358 (diff)
fix(mq_editor): exclude below-keep partials from hit-test selection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor')
-rw-r--r--tools/mq_editor/viewer.js2
1 files changed, 1 insertions, 1 deletions
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) {