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

Add .shudan-boundary to the gridlines representing the goban boundary #24

Open
abaisero opened this issue Aug 31, 2023 · 0 comments
Open

Comments

@abaisero
Copy link

When using Shudan to render boards, all the gridlines have the same thickness. This is perfectly fine if the whole board is shown, as there is not much cause for confusion as to where the borders are. However, I find it a bit hard to quickly determine whether a gridline represents the board border or not in the case where the rangeX and rangeY props are given.

e.g., in this example, I don't know why expecially if points are partially covered by stones, it takes me a couple seconds to determine the real boundaries of the board.

image

Consider instead how much clearer this situation would be if the goban borders were styles with thicker lines, e.g.,

image

Unfortunately the grid lines are rendered as svg rectangles, and styling the thickness of the gridlines means manipulating the height/width attributes, rather than the element style. This means that this kind of change cannot be implemented via CSS alone, and that javascript must be used. That's ok though.

The real issue is to identify which elements correspond to the board boundary and which not. Currently all these rects are selectable through classes .shudan-gridline, .shudan-vertical, and .shudan-horizontal, but nothing that indicates whether it is a boundary gridline or not. I hope/assume that the internal logic of shudan has this information available, but does not expose it. Would it be possible to add another class .shudan-boundary to the gridlines that represent the goban boundary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant