* A sort comparator function used to order character VDOM nodes based on their * `top` and `left` style properties. This ensures a consistent DOM order. * @param {Object} a The first VDOM node. * @param {Object} b The second VDOM node. * @returns {Number} * @protected
(a, b)
| 545 | * @protected |
| 546 | */ |
| 547 | sortCharacters(a, b) { |
| 548 | let deltaTop = parseFloat(a.style.top) - parseFloat(b.style.top); |
| 549 | |
| 550 | if (deltaTop !== 0) { |
| 551 | return deltaTop |
| 552 | } |
| 553 | |
| 554 | return parseFloat(a.style.left) - parseFloat(b.style.left) |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Starts or stops the `setInterval` for automatic text cycling. |
nothing calls this directly
no outgoing calls
no test coverage detected