Skip to content

Commit

Permalink
Fix function names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed Nov 24, 2017
1 parent 1e69ad8 commit 1861750
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
fillingCharSequenceRegExp = new RegExp( fillingCharSequence + '( )?', 'g' ),
isSelectingTable;

function _isWidget( element ) {
function isWidget( element ) {
return CKEDITOR.plugins.widget && CKEDITOR.plugins.widget.isDomWidget( element );
}

Expand All @@ -24,7 +24,7 @@
return false;
}
// It's not table selection when selected node is a widget (#1027).
if ( _isWidget( ranges[ 0 ].getEnclosedNode() ) ) {
if ( isWidget( ranges[ 0 ].getEnclosedNode() ) ) {
return false;
}
var node,
Expand Down Expand Up @@ -104,7 +104,7 @@
}

// When widget is selected, then definitely is not a table (#1027).
if ( _isWidget( fakeSelection.getSelectedElement() ) ) {
if ( isWidget( fakeSelection.getSelectedElement() ) ) {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions plugins/tableselection/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
insertRow,
insertColumn;

function _isWidget( element ) {
function isWidget( element ) {
return CKEDITOR.plugins.widget && CKEDITOR.plugins.widget.isDomWidget( element );
}

Expand Down Expand Up @@ -213,7 +213,7 @@
// but only in case if no other cell between mousedown and mouseup
// was selected.
// We don't want to clear selection if widget is event target (#1027).
if ( !fakeSelection.dirty && cells.length === 1 && !( _isWidget( evt.data.getTarget() ) ) ) {
if ( !fakeSelection.dirty && cells.length === 1 && !( isWidget( evt.data.getTarget() ) ) ) {
return clearFakeCellSelection( editor, evt.name === 'mouseup' );
}

Expand Down Expand Up @@ -276,7 +276,7 @@
}
// Prevent of applying table selection when widget is selected.
// Mouseup remain possibility to finish table selection when user release mouse button above widget in table.
if ( evt.name !== 'mouseup' && _isWidget( evt.data.getTarget() ) ) {
if ( evt.name !== 'mouseup' && isWidget( evt.data.getTarget() ) ) {
return;
}

Expand Down

0 comments on commit 1861750

Please sign in to comment.