Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

notepat-remote: stop drag re-triggering note within same pad

Buttons are rebuilt every paint so the draw-handler's \`hit !== tappedButton\`
identity check was always true — every draw event fired a fresh
tapNote even when the user hadn't moved off the current pad. Compare
by pitch instead. Matches notepat.mjs drag behavior.

+4 -1
+4 -1
system/public/aesthetic.computer/disks/notepat-remote.mjs
··· 348 348 } 349 349 if (e.is("draw")) { 350 350 // Allow drag across buttons (piano-roll tap). Release previous, press new. 351 + // `buttons` is rebuilt every paint, so `hit` is a fresh object even when 352 + // the user hasn't moved off the current pad — compare by pitch instead 353 + // of object identity, otherwise every draw event retriggers the note. 351 354 const hit = hitButton(e.x, e.y); 352 - if (hit && hit !== tappedButton) { 355 + if (hit && (!tappedButton || hit.pitch !== tappedButton.pitch)) { 353 356 if (tappedButton) tapNote(tappedButton.pitch, false); 354 357 tappedButton = hit; 355 358 tapNote(hit.pitch, true);
system/public/m4l/notepat.com.amxd

This is a binary file and will not be displayed.