aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/EquationBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-20 12:24:34 -0400
committerbobzel <zzzman@gmail.com>2021-09-20 12:24:34 -0400
commit240f2c9bda4a9a32d84d1de93820f6fbc8eef458 (patch)
tree61cd1e53d0c97488621aca6cee1f70c8c8127309 /src/client/views/nodes/EquationBox.tsx
parent2dcca57b50c7f53836115cdd880f63ffa42635e2 (diff)
fixed equations/ink to work properly when not fitwidth in lightbox. don't show titles for ink or equations using fields now.
Diffstat (limited to 'src/client/views/nodes/EquationBox.tsx')
-rw-r--r--src/client/views/nodes/EquationBox.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/EquationBox.tsx b/src/client/views/nodes/EquationBox.tsx
index 11ef6562f..f1f802c13 100644
--- a/src/client/views/nodes/EquationBox.tsx
+++ b/src/client/views/nodes/EquationBox.tsx
@@ -84,8 +84,13 @@ export class EquationBox extends ViewBoxBaseComponent<FieldViewProps, EquationDo
}
render() {
TraceMobx();
- return (<div onPointerDown={e => !e.ctrlKey && e.stopPropagation()}
+ const scale = (this.props.scaling?.() || 1) * NumCast(this.layoutDoc._viewScale, 1);
+ return (<div className="equationBox-cont"
+ onPointerDown={e => !e.ctrlKey && e.stopPropagation()}
style={{
+ transform: `scale(${scale})`,
+ width: `${100 / scale}%`,
+ height: `${100 / scale}%`,
pointerEvents: !this.props.isSelected() ? "none" : undefined,
}}
onKeyDown={e => e.stopPropagation()}