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( this.log(
`Requesting browser resize for new char dimensions: ` + `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.char = _.clone(incoming);
this.resizeBrowserWindow(); this.resizeBrowserWindow();

Wyświetl plik

@ -85,8 +85,10 @@ export default MixinBase =>
state = this.config.browsh.use_experimental_text_visibility; state = this.config.browsh.use_experimental_text_visibility;
state = !state; state = !state;
this.config.browsh.use_experimental_text_visibility = state; this.config.browsh.use_experimental_text_visibility = state;
message = state ? 'on' : 'off' message = state ? "on" : "off";
this.sendMessage(`/status,info,Experimental text visibility: ${message}`); this.sendMessage(
`/status,info,Experimental text visibility: ${message}`
);
this.sendSmallTextFrame(); this.sendSmallTextFrame();
break; 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 // Although do note that, unlike selection ranges, sub-selections can appear seemingly
// inside other selections for things like italics or anchor tags. // inside other selections for things like italics or anchor tags.
_getNodeDOMBoxes() { _getNodeDOMBoxes() {
let rects = [] let rects = [];
// TODO: selectNode() hangs if it can't find a node in the DOM // TODO: selectNode() hangs if it can't find a node in the DOM
// Node.isConnected() might be faster // Node.isConnected() might be faster
// It's possible that the node has dissapeared since nodes were collected. // 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); this._range.selectNode(this._node);
rects = this._range.getClientRects(); rects = this._range.getClientRects();
} }

Wyświetl plik

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