Skip to content

Commit

Permalink
Ensure all getters are documented
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Jun 12, 2024
1 parent 4cb88f7 commit ce5117e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions src/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,27 +119,37 @@ class History extends Events {
}

/**
* Whether there are any actions to undo
* Sets whether there are actions to undo.
*
* @type {boolean}
*/
set canUndo(value) {
this._history.canUndo = value;
}

/**
* Gets whether there are actions to undo.
*
* @type {boolean}
*/
get canUndo() {
return this._history.canUndo;
}

/**
* Whether there are actions to redo
* Sets whether there are actions to redo.
*
* @type {boolean}
*/
set canRedo(value) {
this._history.canRedo = value;
}

/**
* Gets whether there are actions to redo.
*
* @type {boolean}
*/
get canRedo() {
return this._history.canRedo;
}
Expand Down
14 changes: 12 additions & 2 deletions src/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@ class SelectionHistory {
}

/**
* Disables / enables selection undo / redo
* Sets enabled state of selection undo / redo.
*
* @type {boolean}
*/
set enabled(value) {
this._enabled = value;
}

/**
* Gets enabled state of selection undo / redo.
*
* @type {boolean}
*/
get enabled() {
return this._enabled;
}
Expand Down Expand Up @@ -323,14 +328,19 @@ class Selection extends Events {
}

/**
* Enables / disables the selection methods
* Sets enabled state of the selection methods.
*
* @type {boolean}
*/
set enabled(value) {
this._enabled = value;
}

/**
* Gets enabled state of the selection methods.
*
* @type {boolean}
*/
get enabled() {
return this._enabled;
}
Expand Down

0 comments on commit ce5117e

Please sign in to comment.