1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00
slate/packages
Dundercover 7192a97600 Add range comparison methods to Point (#2248)
* Rename compare function in path-utils to compareOfSameSize
To make way for a new function that makes a full comparison

* Add compare function to path-utils that handles paths of different sizes

* Add function isAfterRange to Point

* Add function isBeforeRange to Point

* Add function isAtStartOfRange to Point

* Add function isAtEndOfRange to Point

* Add function isInRange to Point

* Add range comparison methods to the documentation of the Point model

* Remove `compareOfSameSize` in `path-utils.js`
Using `compare` instead

* Add `Point.isBeforePoint`

* Add `Point.isAfterPoint`

* Use own methods internally for range comparisons in `Point`

* Return null if paths don't finally match in `compare` method of `path-utils`
To convey that it is not a normal scenario

* Add first test for `Point` model (testing `isAfterPoint`)

* Add tests for `Point.isAfterPoint`

* Add tests for `Point.isBeforePoint`

* Add tests for `Point.isAfterRange`

* Add tests for `Point.isBeforeRange`

* Add tests for `Point.isAtEndOfRange`

* Add tests for `Point.isAtStartOfRange`

* Add tests for `Point.isInRange`
2018-10-15 15:44:09 -07:00
..
2018-10-09 18:46:54 -07:00
2018-08-01 12:07:02 -07:00
2018-08-16 15:26:05 -07:00
2018-08-01 12:07:02 -07:00
2018-09-21 09:43:39 -07:00
2018-10-09 18:46:54 -07:00
2018-10-09 18:46:54 -07:00
2018-10-09 18:46:54 -07:00
2018-10-09 18:46:54 -07:00
2018-10-10 09:52:54 -07:00