@bokeh/bokehjs
Version:
Interactive, novel data visualization
32 lines • 831 B
JavaScript
import { DOMNode, DOMNodeView } from "./dom_node";
export class TextView extends DOMNodeView {
static __name__ = "TextView";
connect_signals() {
super.connect_signals();
const { content } = this.model.properties;
this.on_change(content, () => this.render());
}
render() {
this.el.textContent = this.model.content;
}
// TODO This shouldn't be here.
after_render() {
this.finish();
}
_create_element() {
return document.createTextNode("");
}
}
export class Text extends DOMNode {
static __name__ = "Text";
constructor(attrs) {
super(attrs);
}
static {
this.prototype.default_view = TextView;
this.define(({ Str }) => ({
content: [Str, ""],
}));
}
}
//# sourceMappingURL=text.js.map