File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -820,7 +820,11 @@ class MathBlock extends StatelessWidget {
820
820
children: [TextSpan (text: node.texSource)])));
821
821
}
822
822
823
- return _Katex (inline: false , nodes: nodes);
823
+ return Center (
824
+ child: SingleChildScrollViewWithScrollbar (
825
+ scrollDirection: Axis .horizontal,
826
+ child: _Katex (
827
+ nodes: nodes)));
824
828
}
825
829
}
826
830
@@ -833,24 +837,15 @@ const kBaseKatexTextStyle = TextStyle(
833
837
834
838
class _Katex extends StatelessWidget {
835
839
const _Katex ({
836
- required this .inline,
837
840
required this .nodes,
838
841
});
839
842
840
- final bool inline;
841
843
final List <KatexNode > nodes;
842
844
843
845
@override
844
846
Widget build (BuildContext context) {
845
847
Widget widget = _KatexNodeList (nodes: nodes);
846
848
847
- if (! inline) {
848
- widget = Center (
849
- child: SingleChildScrollViewWithScrollbar (
850
- scrollDirection: Axis .horizontal,
851
- child: widget));
852
- }
853
-
854
849
return Directionality (
855
850
textDirection: TextDirection .ltr,
856
851
child: DefaultTextStyle (
@@ -1272,7 +1267,7 @@ class _InlineContentBuilder {
1272
1267
: WidgetSpan (
1273
1268
alignment: PlaceholderAlignment .baseline,
1274
1269
baseline: TextBaseline .alphabetic,
1275
- child: _Katex (inline : true , nodes: nodes));
1270
+ child: _Katex (nodes: nodes));
1276
1271
1277
1272
case GlobalTimeNode ():
1278
1273
return WidgetSpan (alignment: PlaceholderAlignment .middle,
You can’t perform that action at this time.
0 commit comments