1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-19 14:27:07 +01:00
slate/benchmark
Dundercover 698edc24d8 Add node.getLeafXAtRange and node.getRootXAtRange (#2399)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Adding and improving

#### What's the new behavior?

Renames the following node methods (deprecating the old ones):

- `getBlocksAtRangeAsArray` -> `getLeafBlocksAtRangeAsArray`
- `getBlocksAtRange` -> `getLeafBlocksAtRange`
- `getInlinesAtRangeAsArray` -> `getLeafInlinesAtRangeAsArray`
- `getInlinesAtRange` -> `getLeafInlinesAtRange`

Adds the following nodes methods:

- `getRootBlocksAtRange`
- `getRootInlinesAtRange`

#### How does this change work?

Have not changed the implementation of the renamed methods. Added tests for both renamed methods and added methods.

#### Have you checked that...?

* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)

#### Does this fix any issues or need any specific reviewers?

Discussed in #2351
2018-11-08 13:04:27 -08:00
..
2018-09-21 09:56:20 -07:00