From 198dab278dedc05cef81565e8b24189124cc5df1 Mon Sep 17 00:00:00 2001 From: Xinyu Jiang <125269853+xjiang-at-wiris@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:03:53 +0200 Subject: [PATCH] fix: text bug fixes --- packages/viewer/docs/spec.md | 6 +++--- packages/viewer/src/app.ts | 3 --- packages/viewer/src/latex.ts | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/viewer/docs/spec.md b/packages/viewer/docs/spec.md index f85ad845b..6698585e2 100644 --- a/packages/viewer/docs/spec.md +++ b/packages/viewer/docs/spec.md @@ -112,9 +112,9 @@ The following table contains a specification of each of the properties. | lang | The language for the alt text. | Frontend | | en | | dpi | Resolution in dots per inch of the generated image. This feature scales the formula with a factor of dpi/96. | Frontend | Positive integer | 96 | | zoom | The scale of the generated image. | Frontend | Positive floating point number | 1 | -| vieweroffset | Number of pixels to render in advance. | Frontend | Positive floating point number | 200 | -| simultaneousmml | Mmax number of simultaneous MathML rendering petition can make at the same time. | Frontend | Positive floating point number | 50 | -| simultaneouslatex | max number of simultaneous LaTeX rendering petition can make at the same time. | Frontend | Positive floating point number | 50 | +| vieweroffset | We render only the formulas on screen. This parameter defines the number of pixels to render in advance. | Frontend | Positive floating point number | 200 | +| simultaneousmml | Max number of possible simultaneous MathML rendering petitions at the same time. | Frontend | Positive floating point number | 50 | +| simultaneouslatex | Max number of possible simultaneous LaTeX rendering petitions at the same time. | Frontend | Positive floating point number | 50 | ## API diff --git a/packages/viewer/src/app.ts b/packages/viewer/src/app.ts index 6d229ae28..1b12e57ed 100644 --- a/packages/viewer/src/app.ts +++ b/packages/viewer/src/app.ts @@ -84,12 +84,9 @@ async function main(w: Window): Promise { const allElements = document.querySelectorAll('*'); window.addEventListener("load", function () { - let counter = 0; allElements.forEach(function (element) { mathobserver.observe(element); - counter++; }); - console.log(counter); }); //MutationObserver diff --git a/packages/viewer/src/latex.ts b/packages/viewer/src/latex.ts index 48814a18b..f74692098 100644 --- a/packages/viewer/src/latex.ts +++ b/packages/viewer/src/latex.ts @@ -18,7 +18,7 @@ export async function renderLatex(properties: Properties, root: HTMLElement) { const latexNodes = findLatexTextNodes(root); - const maxLatexPetition = properties.simultaneousmml; + const maxLatexPetition = properties.simultaneouslatex; let promises = [];