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 @@ -818,7 +818,11 @@ class MathBlock extends StatelessWidget {
818
818
children: [TextSpan (text: node.texSource)])));
819
819
}
820
820
821
- return _Katex (inline: false , nodes: nodes);
821
+ return Center (
822
+ child: SingleChildScrollViewWithScrollbar (
823
+ scrollDirection: Axis .horizontal,
824
+ child: _Katex (
825
+ nodes: nodes)));
822
826
}
823
827
}
824
828
@@ -831,24 +835,15 @@ const kBaseKatexTextStyle = TextStyle(
831
835
832
836
class _Katex extends StatelessWidget {
833
837
const _Katex ({
834
- required this .inline,
835
838
required this .nodes,
836
839
});
837
840
838
- final bool inline;
839
841
final List <KatexNode > nodes;
840
842
841
843
@override
842
844
Widget build (BuildContext context) {
843
845
Widget widget = _KatexNodeList (nodes: nodes);
844
846
845
- if (! inline) {
846
- widget = Center (
847
- child: SingleChildScrollViewWithScrollbar (
848
- scrollDirection: Axis .horizontal,
849
- child: widget));
850
- }
851
-
852
847
return Directionality (
853
848
textDirection: TextDirection .ltr,
854
849
child: DefaultTextStyle (
@@ -1265,7 +1260,7 @@ class _InlineContentBuilder {
1265
1260
: WidgetSpan (
1266
1261
alignment: PlaceholderAlignment .baseline,
1267
1262
baseline: TextBaseline .alphabetic,
1268
- child: _Katex (inline : true , nodes: nodes));
1263
+ child: _Katex (nodes: nodes));
1269
1264
1270
1265
case GlobalTimeNode ():
1271
1266
return WidgetSpan (alignment: PlaceholderAlignment .middle,
You can’t perform that action at this time.
0 commit comments