Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes the notation if the analysis starts with black to move #605

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/src/view/analysis/tree_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
nodes: root.children,
shouldShowComments: shouldShowComments,
inMainline: true,
startMainline: true,
startSideline: false,
initialPath: UciPath.empty,
);
Expand Down Expand Up @@ -169,6 +170,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
required ViewNode parent,
required IList<ViewBranch> nodes,
required bool inMainline,
required bool startMainline,
required bool startSideline,
required bool shouldShowComments,
required UciPath initialPath,
Expand All @@ -191,6 +193,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
key: currentMove ? currentMoveKey : null,
shouldShowComments: shouldShowComments,
isSideline: !inMainline,
startMainline: startMainline,
startSideline: startSideline,
endSideline: !inMainline && firstChild.children.isEmpty,
),
Expand All @@ -213,6 +216,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
nodes: [nodes[i]].lockUnsafe,
shouldShowComments: shouldShowComments,
inMainline: false,
startMainline: false,
startSideline: true,
initialPath: initialPath,
),
Expand All @@ -227,6 +231,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
nodes: [nodes[i]].lockUnsafe,
shouldShowComments: shouldShowComments,
inMainline: false,
startMainline: false,
startSideline: true,
initialPath: initialPath,
),
Expand All @@ -242,6 +247,7 @@ class _InlineTreeViewState extends ConsumerState<AnalysisTreeView> {
nodes: firstChild.children,
shouldShowComments: shouldShowComments,
inMainline: inMainline,
startMainline: false,
startSideline: false,
initialPath: newPath,
),
Expand Down Expand Up @@ -278,6 +284,7 @@ class InlineMove extends ConsumerWidget {
required this.isCurrentMove,
required this.isSideline,
super.key,
this.startMainline = false,
this.startSideline = false,
this.endSideline = false,
});
Expand All @@ -289,6 +296,7 @@ class InlineMove extends ConsumerWidget {
final bool shouldShowComments;
final bool isCurrentMove;
final bool isSideline;
final bool startMainline;
final bool startSideline;
final bool endSideline;

Expand Down Expand Up @@ -323,7 +331,7 @@ class InlineMove extends ConsumerWidget {
'${(ply / 2).ceil()}.',
style: indexTextStyle,
)
: (startSideline
: ((startMainline || startSideline)
? Text(
'${(ply / 2).ceil()}...',
style: indexTextStyle,
Expand Down