diff options
Diffstat (limited to 'tools/mq_editor/viewer.js')
| -rw-r--r-- | tools/mq_editor/viewer.js | 2 |
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) { |
