Skip to content

Commit

Permalink
Update lables even without MatJax/TypeSetter
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Oct 29, 2024
1 parent 303cae4 commit 72be8ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/controls/src/widget_description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,15 @@ export class DescriptionView extends DOMWidgetView {

typeset(element: HTMLElement, text?: string): void {
this.displayed.then(() => {
if ((window as any).MathJax?.Hub?.Queue) {
return typeset(element, text);
}
const widget_manager: any = this.model.widget_manager;
const latexTypesetter = widget_manager._rendermime?.latexTypesetter;
if (latexTypesetter) {
if (text !== void 0) {
element.textContent = text;
}
latexTypesetter.typeset(element);
} else {
return typeset(element, text);
}
});
}
Expand Down

0 comments on commit 72be8ec

Please sign in to comment.