提交 963d1dd5 编写于 作者: D Daniel Imms

Prefix private with _

上级 d28a7fd5
...@@ -58,7 +58,7 @@ export abstract class SimpleFindWidget extends Widget { ...@@ -58,7 +58,7 @@ export abstract class SimpleFindWidget extends Widget {
return null; return null;
} catch (e) { } catch (e) {
this.foundMatch = false; this.foundMatch = false;
this.updateButtons(); this._updateButtons();
return { content: e.message }; return { content: e.message };
} }
} }
...@@ -69,7 +69,7 @@ export abstract class SimpleFindWidget extends Widget { ...@@ -69,7 +69,7 @@ export abstract class SimpleFindWidget extends Widget {
this.oninput(this._findInput.domNode, (e) => { this.oninput(this._findInput.domNode, (e) => {
this.foundMatch = this.onInputChanged(); this.foundMatch = this.onInputChanged();
this.updateButtons(); this._updateButtons();
this._delayedUpdateHistory(); this._delayedUpdateHistory();
}); });
...@@ -219,7 +219,7 @@ export abstract class SimpleFindWidget extends Widget { ...@@ -219,7 +219,7 @@ export abstract class SimpleFindWidget extends Widget {
} }
this._isVisible = true; this._isVisible = true;
this.updateButtons(); this._updateButtons();
setTimeout(() => { setTimeout(() => {
dom.addClass(this._innerDomNode, 'visible'); dom.addClass(this._innerDomNode, 'visible');
...@@ -250,7 +250,7 @@ export abstract class SimpleFindWidget extends Widget { ...@@ -250,7 +250,7 @@ export abstract class SimpleFindWidget extends Widget {
// Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list // Need to delay toggling visibility until after Transition, then visibility hidden - removes from tabIndex list
setTimeout(() => { setTimeout(() => {
this._isVisible = false; this._isVisible = false;
this.updateButtons(); this._updateButtons();
dom.removeClass(this._innerDomNode, 'visible'); dom.removeClass(this._innerDomNode, 'visible');
}, 200); }, 200);
} }
...@@ -276,7 +276,7 @@ export abstract class SimpleFindWidget extends Widget { ...@@ -276,7 +276,7 @@ export abstract class SimpleFindWidget extends Widget {
return this._findInput.getCaseSensitive(); return this._findInput.getCaseSensitive();
} }
private updateButtons() { private _updateButtons() {
let hasInput = this.inputValue.length > 0; let hasInput = this.inputValue.length > 0;
this.prevBtn.setEnabled(this._isVisible && hasInput && this.foundMatch); this.prevBtn.setEnabled(this._isVisible && hasInput && this.foundMatch);
this.nextBtn.setEnabled(this._isVisible && hasInput && this.foundMatch); this.nextBtn.setEnabled(this._isVisible && hasInput && this.foundMatch);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册