(position)
| 694 | } |
| 695 | |
| 696 | locationFromPosition(position) { |
| 697 | const location = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, position)) |
| 698 | if (location.index != null) { |
| 699 | return location |
| 700 | } else { |
| 701 | const blocks = this.getBlocks() |
| 702 | return { index: blocks.length - 1, offset: blocks[blocks.length - 1].getLength() } |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | positionFromLocation(location) { |
| 707 | return this.blockList.findPositionAtIndexAndOffset(location.index, location.offset) |
no test coverage detected