JS prettier fixes

pull/286/head
Thomas Buckley-Houston 2019-06-18 12:51:06 +03:00
rodzic f8b0e5592b
commit d079f9a353
4 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -30,7 +30,9 @@ export default class extends utils.mixins(CommonMixin) {
) {
this.log(
`Requesting browser resize for new char dimensions: ` +
`${incoming.width}x${incoming.height} (old: ${this.char.width}x${this.char.height})`
`${incoming.width}x${incoming.height} (old: ${this.char.width}x${
this.char.height
})`
);
this.char = _.clone(incoming);
this.resizeBrowserWindow();

Wyświetl plik

@ -85,8 +85,10 @@ export default MixinBase =>
state = this.config.browsh.use_experimental_text_visibility;
state = !state;
this.config.browsh.use_experimental_text_visibility = state;
message = state ? 'on' : 'off'
this.sendMessage(`/status,info,Experimental text visibility: ${message}`);
message = state ? "on" : "off";
this.sendMessage(
`/status,info,Experimental text visibility: ${message}`
);
this.sendSmallTextFrame();
break;
}

Wyświetl plik

@ -248,11 +248,11 @@ export default class extends utils.mixins(CommonMixin, SerialiseMixin) {
// Although do note that, unlike selection ranges, sub-selections can appear seemingly
// inside other selections for things like italics or anchor tags.
_getNodeDOMBoxes() {
let rects = []
let rects = [];
// TODO: selectNode() hangs if it can't find a node in the DOM
// Node.isConnected() might be faster
// It's possible that the node has dissapeared since nodes were collected.
if (document.body.contains(this._node)){
if (document.body.contains(this._node)) {
this._range.selectNode(this._node);
rects = this._range.getClientRects();
}

Wyświetl plik

@ -100,7 +100,7 @@ export default class {
// the TTY grid.
_isCharObscured(colours) {
if (!this.config.browsh.use_experimental_text_visibility) {
return false
return false;
}
return (
colours[0][0] === colours[1][0] &&