aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-03-12 09:09:59 -0400
committerbobzel <zzzman@gmail.com>2024-03-12 09:09:59 -0400
commitc563aec906c5728a5563fefac6ab573a31375641 (patch)
tree8a464f29b9975b644f6d78a64f56fad902d3dc08 /src/client/views/StyleProvider.tsx
parentcf91f5d4db5ba822b30d06cae9934bc979aff829 (diff)
made text templates be both layout templates and prototypes of new text documents. fixed onPaint funcs to be undoable. fixed comparisonBox to render a text box if it's fieldKey has a richtext field - this makes flashcard templates much easier. fixed right-click on hyperlinks to bring up menu. fixed layout_centered to be settable on templates. added enable flashcard property for text.
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r--src/client/views/StyleProvider.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index 0794efe4c..ab811858a 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -61,7 +61,7 @@ function togglePaintView(e: React.MouseEvent, doc: Opt<Doc>, props: Opt<FieldVie
value: undefined,
};
e.stopPropagation();
- UndoManager.RunInBatch(() => doc && ScriptCast(doc.onPaint).script.run(scriptProps), 'togglePaintView');
+ ScriptCast(doc?.onPaint)?.script.run(scriptProps);
}
export function wavyBorderPath(pw: number, ph: number, inset: number = 0.05) {