mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
lint
This commit is contained in:
parent
fb08d45eac
commit
814677f3b0
1 changed files with 17 additions and 19 deletions
|
|
@ -270,33 +270,29 @@ export default class HyperTerm extends Component {
|
|||
}
|
||||
|
||||
changeFontSize (value) {
|
||||
const uid = this.state.sessions[this.state.active];
|
||||
const term = this.refs[`term-${uid}`];
|
||||
if (term) {
|
||||
try {
|
||||
const size = term.term.prefs_.get('font-size');
|
||||
term.term.prefs_.set('font-size', size + value);
|
||||
} catch (e) {
|
||||
alert(e);
|
||||
}
|
||||
}
|
||||
const uid = this.state.sessions[this.state.active];
|
||||
const term = this.refs[`term-${uid}`];
|
||||
if (term) {
|
||||
const size = term.term.prefs_.get('font-size');
|
||||
term.term.prefs_.set('font-size', size + value);
|
||||
}
|
||||
}
|
||||
|
||||
resetFontSize () {
|
||||
const uid = this.state.sessions[this.state.active];
|
||||
const term = this.refs[`term-${uid}`];
|
||||
if (term) {
|
||||
//TODO: once we have preferences, we need to read from it
|
||||
term.term.prefs_.set('font-size', 12);
|
||||
}
|
||||
const uid = this.state.sessions[this.state.active];
|
||||
const term = this.refs[`term-${uid}`];
|
||||
if (term) {
|
||||
// TODO: once we have preferences, we need to read from it
|
||||
term.term.prefs_.set('font-size', 12);
|
||||
}
|
||||
}
|
||||
|
||||
increaseFontSize () {
|
||||
this.changeFontSize(1);
|
||||
this.changeFontSize(1);
|
||||
}
|
||||
|
||||
decreaseFontSize () {
|
||||
this.changeFontSize(-1);
|
||||
this.changeFontSize(-1);
|
||||
}
|
||||
|
||||
onSessionExit ({ uid }) {
|
||||
|
|
@ -451,7 +447,9 @@ export default class HyperTerm extends Component {
|
|||
} else {
|
||||
// http://www.quirksmode.org/dom/events/click.html
|
||||
// https://en.wikipedia.org/wiki/Double-click
|
||||
this.clickTimer = setTimeout(() => this.clicks = 0, 500);
|
||||
this.clickTimer = setTimeout(() => {
|
||||
this.clicks = 0;
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue