feat(canvas): contrato ownsPointer — tocar una pantalla tactil en Run no la arrastra

La whitelist de tags que poseen el puntero durante la simulacion gana una
salida generica regla-6a: el elemento declara `get ownsPointer() { return
true }` y el wrapper no inicia el drag mientras corre. El cristal del Round
Display pintaba el punto verde Y arrastraba el shield por el canvas a la vez.
This commit is contained in:
David Montero Crespo 2026-07-28 15:33:24 +02:00
parent 98df5134cb
commit 3ca8bf0e6e
1 changed files with 7 additions and 1 deletions

View File

@ -480,7 +480,13 @@ export const DynamicComponent: React.FC<DynamicComponentProps> = ({
tag === 'wokwi-analog-joystick' ||
tag === 'wokwi-ky-040' ||
tag === 'wokwi-membrane-keypad' ||
tag === 'wokwi-rotary-dialer');
tag === 'wokwi-rotary-dialer' ||
// Rule-6a escape hatch: a (possibly private-overlay) element whose
// surface IS the interaction — a touch screen — declares it via a
// property instead of this list growing pro tag names. While the
// sim runs, touching it must touch, not drag: the Round Display's
// glass was painting the green dot AND dragging the shield around.
(target as { ownsPointer?: boolean }).ownsPointer === true);
if (ownsPointer) {
// Let the wokwi component own this pointerdown.
return;