kopia lustrzana https://github.com/browsh-org/browsh
JS prettier fixes
rodzic
f8b0e5592b
commit
d079f9a353
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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] &&
|
||||||
|
|
Ładowanie…
Reference in New Issue