Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Dropped _isInBalloon getter.
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarwrobel committed Apr 5, 2017
1 parent bea3fc6 commit 4163fb7
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,6 @@ export default class Link extends Plugin {
this._attachActions();
}

/**
* Returns `true` when link view is added to the {@link module:ui/contextualballoon~ContextualBalloon}.
*
* @private
* @returns {Boolean}
*/
get _isInBalloon() {
return this._balloon.hasView( this.formView );
}

/**
* Creates the {@link module:link/ui/linkformview~LinkFormView} instance.
*
Expand Down Expand Up @@ -239,7 +229,7 @@ export default class Link extends Plugin {
// Close on click outside of balloon panel element.
clickOutsideHandler( {
emitter: this.formView,
activator: () => this._isInBalloon,
activator: () => this._balloon.hasView( this.formView ),
contextElement: this._balloon.view.element,
callback: () => this._hidePanel()
} );
Expand All @@ -252,7 +242,7 @@ export default class Link extends Plugin {
* @param {Boolean} [focusInput=false] When `true`, link form will be focused on panel show.
*/
_showPanel( focusInput ) {
if ( this._isInBalloon ) {
if ( this._balloon.hasView( this.formView ) ) {
return;
}

Expand All @@ -273,7 +263,7 @@ export default class Link extends Plugin {
* @param {Boolean} [focusEditable=false] When `true`, editable focus will be restored on panel hide.
*/
_hidePanel( focusEditable ) {
if ( !this._isInBalloon ) {
if ( !this._balloon.hasView( this.formView ) ) {
return;
}

Expand Down

0 comments on commit 4163fb7

Please # to comment.