wiris / html-integrations

The official JavaScript library for MathType, the leading formula editor and equation writer for the web by Wiris
https://wiris.com/solutions/integrations/html-editors/
MIT License
76 stars 53 forks source link

Kb 48270 #990

Open xjiang-at-wiris opened 2 months ago

xjiang-at-wiris commented 2 months ago

Description

Optimized the performance of the viewer by implementing the following:

  1. Added an Interaction Observer to avoid rendering all functions on the page simultaneously. Instead, it renders only the currently visible functions and some that are just outside the viewport.
  2. Added a Mutation Observer to render newly added functions individually instead of re-rendering the entire page. This also allows for the quick conversion of LaTeX to MathML.
  3. Enabled concurrent rendering of multiple functions within a set upper limit, ensuring all visible functions on the page are rendered in parallel.

Steps to reproduce

  1. Launch viewer on local yarn && nx build viewer && nx start html-viewer or in kitchen
  2. Try to put a lot of formulas, you can use this
  3. Ensure all mencioned before are working
  4. Try to modify new added parameters on table simultaneousmml simultaneouslatex vieweroffset

#48270

carla-at-wiris commented 2 months ago

I'm getting the following console errors on the viewer demo: image image

usantos-at-wiris commented 1 month ago

Hey, remember to add the decode so this work ! 😊«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfrac»«mrow»«mi»r«/mi»«mi»e«/mi»«/mrow»«mi»w«/mi»«/mfrac»«mi»r«/mi»«/math»