mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
minor syntax cleanup (2 vs 4 spaces) and clear clickTimer timeout
This commit is contained in:
parent
50fdbf2ef7
commit
33e3d487a1
1 changed files with 12 additions and 13 deletions
|
|
@ -402,27 +402,26 @@ export default class HyperTerm extends Component {
|
|||
this.clicks = this.clicks || 1;
|
||||
|
||||
if (this.clicks++ >= 2) {
|
||||
if (this.maximized) {
|
||||
this.rpc.emit('unmaximize');
|
||||
} else {
|
||||
this.rpc.emit('maximize');
|
||||
}
|
||||
this.clicks = 0;
|
||||
this.maximized = !this.maximized;
|
||||
if (this.maximized) {
|
||||
this.rpc.emit('unmaximize');
|
||||
} else {
|
||||
this.rpc.emit('maximize');
|
||||
}
|
||||
this.clicks = 0;
|
||||
this.maximized = !this.maximized;
|
||||
} else {
|
||||
// http://www.quirksmode.org/dom/events/click.html
|
||||
// https://en.wikipedia.org/wiki/Double-click
|
||||
this.clickTimer = setTimeout(() => this.clicks = 0, 500);
|
||||
// http://www.quirksmode.org/dom/events/click.html
|
||||
// https://en.wikipedia.org/wiki/Double-click
|
||||
this.clickTimer = setTimeout(() => this.clicks = 0, 500);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
this.rpc.destroy();
|
||||
clearTimeout(this.resizeIndicatorTimeout);
|
||||
if (this.keys) {
|
||||
this.keys.reset();
|
||||
}
|
||||
if (this.keys) this.keys.reset();
|
||||
delete this.clicks;
|
||||
clearTimeout(this.clickTimer);
|
||||
this.updateChecker.destroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue