( x: number, y: number, direction: ScrollDirection, distance: number, )
| 1023 | } |
| 1024 | |
| 1025 | function pointOffsetByDirection( |
| 1026 | x: number, |
| 1027 | y: number, |
| 1028 | direction: ScrollDirection, |
| 1029 | distance: number, |
| 1030 | ): { x2: number; y2: number } { |
| 1031 | switch (direction) { |
| 1032 | case 'up': |
| 1033 | return { x2: x, y2: y - distance }; |
| 1034 | case 'down': |
| 1035 | return { x2: x, y2: y + distance }; |
| 1036 | case 'left': |
| 1037 | return { x2: x - distance, y2: y }; |
| 1038 | case 'right': |
| 1039 | return { x2: x + distance, y2: y }; |
| 1040 | } |
| 1041 | } |
| 1042 | |
| 1043 | export async function handleReadCommand( |
| 1044 | device: DeviceInfo, |
no outgoing calls
no test coverage detected
searching dependent graphs…