desmosinc / mathquill

Magic textboxes where you can type math as easily as writing!
mathquill.com
137 stars 42 forks source link

Clarify cursor update in renderLatexMath #230

Closed jwmerrill closed 2 years ago

jwmerrill commented 2 years ago

Previously, if you set the exact same latex as what was currently set, the cursor would not be moved to the end, but in all other cases, it would be. I think this is confusing and could allow bugs in that special case that don't exist in other cases.

Now, pull out logic for moving the cursor and for checking whether the latex is exactly the same into the renderLatexMath method to clarify that it should be the same whether we run renderLatexMathEfficiently or renderLatexMathFromScratch.

Also rename renderLatexMathEfficiently to updateLatexMathEfficiently.

Note: I have verified that this benchmark does not significantly impact benchmark/update.html

jwmerrill commented 2 years ago

Retest windows