1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-22 16:17:17 +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:
Soreine 2016-11-07 18:40:12 +01:00
parent 83fa16d451
commit 44180c020e

View File

@ -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.
*/