mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 15:02:51 +02:00
change hasUndo and hasRedo to hasUndos and hasRedos
This commit is contained in:
@@ -22,8 +22,8 @@ For convenience, in addition to transforms, many of the [`Selection`](./selectio
|
|||||||
- [`fragment`](#fragment)
|
- [`fragment`](#fragment)
|
||||||
- [`inlines`](#inlines)
|
- [`inlines`](#inlines)
|
||||||
- [`texts`](#texts)
|
- [`texts`](#texts)
|
||||||
- [`hasUndo`](#hasundo)
|
- [`hasUndos`](#hasundos)
|
||||||
- [`hasRedo`](#hasredo)
|
- [`hasRedos`](#hasredos)
|
||||||
- [Selection-like Properties](#selection-like-properties)
|
- [Selection-like Properties](#selection-like-properties)
|
||||||
- [`{edge}Key`](#edgekey)
|
- [`{edge}Key`](#edgekey)
|
||||||
- [`{edge}Offset`](#edgeoffset)
|
- [`{edge}Offset`](#edgeoffset)
|
||||||
@@ -99,15 +99,15 @@ Get a list of the lowest-depth [`Inline`](./inline.md) nodes in the current sele
|
|||||||
|
|
||||||
Get a list of the [`Text`](./text.md) nodes in the current selection.
|
Get a list of the [`Text`](./text.md) nodes in the current selection.
|
||||||
|
|
||||||
### `hasUndo`
|
### `hasUndos`
|
||||||
`Boolean`
|
`Boolean`
|
||||||
|
|
||||||
Whether there are undoable events.
|
Whether there are undoable snapshots to revert to in the history.
|
||||||
|
|
||||||
### `hasRedo`
|
### `hasRedos`
|
||||||
`Boolean`
|
`Boolean`
|
||||||
|
|
||||||
Whether there are redoable events.
|
Whether there are redoable snapshots to revert to in the history.
|
||||||
|
|
||||||
## Selection-like Properties
|
## Selection-like Properties
|
||||||
|
|
||||||
|
@@ -61,20 +61,20 @@ class State extends new Record(DEFAULTS) {
|
|||||||
/**
|
/**
|
||||||
* Is there undoable events?
|
* Is there undoable events?
|
||||||
*
|
*
|
||||||
* @return {Boolean} hasUndo
|
* @return {Boolean} hasUndos
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get hasUndo() {
|
get hasUndos() {
|
||||||
return this.history.undos.size > 0
|
return this.history.undos.size > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is there redoable events?
|
* Is there redoable events?
|
||||||
*
|
*
|
||||||
* @return {Boolean} hasRedo
|
* @return {Boolean} hasRedos
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get hasRedo() {
|
get hasRedos() {
|
||||||
return this.history.redos.size > 0
|
return this.history.redos.size > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user