Skip to content

Commit

Permalink
lint + rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Mar 10, 2022
1 parent 3b80c7b commit 1a3f138
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions src/mixins/itext_behavior.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@
},

/**
*
* @param {'left'|'right'} from
* @param {number} startFrom
*
* @param {'left'|'right'} from
* @param {number} startFrom
* @return {number} New selection index
*/
findWordBoundary: function (from, startFrom) {
return from === 'right' ?
this.findWordBoundaryRight(startFrom) :
this.findWordBoundaryLeft(startFrom)
this.findWordBoundaryLeft(startFrom);
},

/**
Expand Down Expand Up @@ -247,15 +247,15 @@
},

/**
*
* @param {'left'|'right'} from
* @param {number} startFrom
*
* @param {'left'|'right'} from
* @param {number} startFrom
* @return {number} New selection index
*/
findLineBoundary: function (from, startFrom) {
return from === 'right' ?
this.findLineBoundaryRight(startFrom) :
this.findLineBoundaryLeft(startFrom)
this.findLineBoundaryLeft(startFrom);
},

/**
Expand Down
22 changes: 11 additions & 11 deletions src/mixins/itext_key_behavior.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
27: 'exitEditing',
33: 'moveCursorUp',
34: 'moveCursorDown',
35: 'moveCursorRight',
36: 'moveCursorLeft',
37: 'moveCursorLeft',
35: 'moveCursorEndDir',
36: 'moveCursorStartDir',
37: 'moveCursorStartDir',
38: 'moveCursorUp',
39: 'moveCursorRight',
39: 'moveCursorEndDir',
40: 'moveCursorDown',
},

Expand All @@ -70,11 +70,11 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
27: 'exitEditing',
33: 'moveCursorUp',
34: 'moveCursorDown',
35: 'moveCursorLeft',
36: 'moveCursorRight',
37: 'moveCursorRight',
35: 'moveCursorStartDir',
36: 'moveCursorEndDir',
37: 'moveCursorEndDir',
38: 'moveCursorUp',
39: 'moveCursorLeft',
39: 'moveCursorStartDir',
40: 'moveCursorDown',
},

Expand Down Expand Up @@ -497,7 +497,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
* Moves cursor left
* @param {Event} e Event object
*/
moveCursorLeft: function(e) {
moveCursorStartDir: function (e) {
if (this.selectionStart === 0 && this.selectionEnd === 0) {
return;
}
Expand Down Expand Up @@ -528,7 +528,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
* Moves cursor right
* @param {Event} e Event object
*/
moveCursorRight: function (e) {
moveCursorEndDir: function (e) {
if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {
return;
}
Expand Down Expand Up @@ -557,7 +557,7 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot

/**
* @private
* @param {boolean} dirty
* @param {boolean} dirty
*/
_invalidateCursor: function (dirty) {
this._currentCursorOpacity = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@
},

/**
*
* @param {boolean} rtl
*
* @param {boolean} rtl
* @param {TextAlign} [textAlign]
* @returns {TextAlign}
*/
Expand Down

0 comments on commit 1a3f138

Please sign in to comment.