Compare commits

..

No commits in common. "0edc7bd1610d140413808c1a56877ffd6d657d90" and "fbb1f352e9f8f7b686fa8a5f87d6c145ac4c18e9" have entirely different histories.

View File

@ -61,40 +61,28 @@ export default function RightAngle({ props }) {
<div className="grid-direction">
<button
className={`direction up ${arrow1 === '↑' ? 'act' : ''}`}
onMouseDown={(e) => {
e.preventDefault(); // input
}}
onClick={(e) => {
onClick={() => {
setArrow1('↑')
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowUp' }))
}}
></button>
<button
className={`direction down ${arrow1 === '↓' ? 'act' : ''}`}
onMouseDown={(e) => {
e.preventDefault(); // input
}}
onClick={(e) => {
onClick={() => {
setArrow1('↓')
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown' }))
}}
></button>
<button
className={`direction left ${arrow1 === '←' ? 'act' : ''}`}
onMouseDown={(e) => {
e.preventDefault(); // input
}}
onClick={(e) => {
onClick={() => {
setArrow1('←')
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowLeft' }))
}}
></button>
<button
className={`direction right ${arrow1 === '→' ? 'act' : ''}`}
onMouseDown={(e) => {
e.preventDefault(); // input
}}
onClick={(e) => {
onClick={() => {
setArrow1('→')
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight' }))
}}