mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Better legibility when editing some math elements.
This commit is contained in:
parent
089aaa8792
commit
b988f67759
3 changed files with 22 additions and 1 deletions
|
@ -876,6 +876,13 @@ const cleanMathElementUpdate = function (updates) {
|
|||
return oldUpdates;
|
||||
} as SubtypeMethods["clean"];
|
||||
|
||||
const getMathEditorStyle = function (element) {
|
||||
if (isMathElement(element)) {
|
||||
return { background: undefined };
|
||||
}
|
||||
return {};
|
||||
} as SubtypeMethods["getEditorStyle"];
|
||||
|
||||
const measureMathElement = function (element, next) {
|
||||
ensureMathElement(element);
|
||||
const isMathJaxLoaded = mathJaxLoaded;
|
||||
|
@ -1542,6 +1549,7 @@ export const prepareMathSubtype = function (
|
|||
const methods = {} as SubtypeMethods;
|
||||
methods.clean = cleanMathElementUpdate;
|
||||
methods.ensureLoaded = ensureMathJaxLoaded;
|
||||
methods.getEditorStyle = getMathEditorStyle;
|
||||
methods.measureText = measureMathElement;
|
||||
methods.render = renderMathElement;
|
||||
methods.renderSvg = renderSvgMathElement;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue