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) {
|
changeFontSize (value) {
|
||||||
const uid = this.state.sessions[this.state.active];
|
const uid = this.state.sessions[this.state.active];
|
||||||
const term = this.refs[`term-${uid}`];
|
const term = this.refs[`term-${uid}`];
|
||||||
if (term) {
|
if (term) {
|
||||||
try {
|
const size = term.term.prefs_.get('font-size');
|
||||||
const size = term.term.prefs_.get('font-size');
|
term.term.prefs_.set('font-size', size + value);
|
||||||
term.term.prefs_.set('font-size', size + value);
|
}
|
||||||
} catch (e) {
|
|
||||||
alert(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resetFontSize () {
|
resetFontSize () {
|
||||||
const uid = this.state.sessions[this.state.active];
|
const uid = this.state.sessions[this.state.active];
|
||||||
const term = this.refs[`term-${uid}`];
|
const term = this.refs[`term-${uid}`];
|
||||||
if (term) {
|
if (term) {
|
||||||
//TODO: once we have preferences, we need to read from it
|
// TODO: once we have preferences, we need to read from it
|
||||||
term.term.prefs_.set('font-size', 12);
|
term.term.prefs_.set('font-size', 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
increaseFontSize () {
|
increaseFontSize () {
|
||||||
this.changeFontSize(1);
|
this.changeFontSize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
decreaseFontSize () {
|
decreaseFontSize () {
|
||||||
this.changeFontSize(-1);
|
this.changeFontSize(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSessionExit ({ uid }) {
|
onSessionExit ({ uid }) {
|
||||||
|
|
@ -451,7 +447,9 @@ export default class HyperTerm extends Component {
|
||||||
} else {
|
} else {
|
||||||
// http://www.quirksmode.org/dom/events/click.html
|
// http://www.quirksmode.org/dom/events/click.html
|
||||||
// https://en.wikipedia.org/wiki/Double-click
|
// 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