( parsed: ParsedDocument, ids: HfId[], x: number, y: number, )
| 335 | } |
| 336 | |
| 337 | function handleMoveElement( |
| 338 | parsed: ParsedDocument, |
| 339 | ids: HfId[], |
| 340 | x: number, |
| 341 | y: number, |
| 342 | ): MutationResult { |
| 343 | // HF elements are positioned via data-x / data-y (parsed by htmlParser.ts, |
| 344 | // emitted by hyperframes generator). CSS left/top is not the convention. |
| 345 | const rx = handleSetAttribute(parsed, ids, "data-x", String(x)); |
| 346 | const ry = handleSetAttribute(parsed, ids, "data-y", String(y)); |
| 347 | return { |
| 348 | forward: [...rx.forward, ...ry.forward], |
| 349 | inverse: [...ry.inverse, ...rx.inverse], |
| 350 | }; |
| 351 | } |
| 352 | |
| 353 | function handleSetText(parsed: ParsedDocument, ids: HfId[], value: string): MutationResult { |
| 354 | const result: MutationResult = { forward: [], inverse: [] }; |
no test coverage detected