mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-22 08:02:25 +01:00
Remove memoization on Selection
All Selection methods use almost directly some Node methods which are already memoized. This removes the needless overhead of memoization for Selection, which changes often
This commit is contained in:
parent
83fa16d451
commit
44180c020e
@ -1,5 +1,4 @@
|
||||
|
||||
import memoize from '../utils/memoize'
|
||||
import getLeafText from '../utils/get-leaf-text'
|
||||
import warning from '../utils/warning'
|
||||
import { Record } from 'immutable'
|
||||
@ -698,23 +697,6 @@ EDGE_METHODS.forEach((pattern) => {
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Memoize read methods.
|
||||
*/
|
||||
|
||||
memoize(Selection.prototype, [
|
||||
'hasAnchorAtStartOf',
|
||||
'hasAnchorAtEndOf',
|
||||
'hasAnchorBetween',
|
||||
'hasAnchorIn',
|
||||
'hasFocusAtEndOf',
|
||||
'hasFocusAtStartOf',
|
||||
'hasFocusBetween',
|
||||
'hasFocusIn',
|
||||
'isAtStartOf',
|
||||
'isAtEndOf'
|
||||
])
|
||||
|
||||
/**
|
||||
* Export.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user