Conversation
… down causes drawings to be cleared.
…lear-shapes-after-click-or-tap"" This reverts commit 03cc8ff.
| drawClear(s); | ||
| if (!previouslySelected && s.drawable.enabled) { | ||
| if (s.drawable.eraseOnMouchDown) drawClear(s); | ||
| else if (piece?.color !== s.turnColor) s.pixelCoordsOfMouchDownToMaybeClearShapes = position; |
There was a problem hiding this comment.
this turnColor check really only makes sense when you're playing a game. But most arrows I think are drawn in studies/broadcast/analysis.
There was a problem hiding this comment.
@ornicar I've tested on studies/analysis and the turnColor stores which side is to move there as well. Unless I'm misunderstanding.
it should leak to the publicly exposed API configuration
|
Excuse me, but can you remind exactly what use case this improves? I added a test board to experiment with it. I think it works? But I don't understand why it's useful. I only found it more confusing, and harder to predict if a click or a drag will clear the shapes or not. |
|
@ornicar Two main use cases I had in mind:
If the user's on a computer using a mouse though, I agree there're essentially no benefits. |
This PR does the following:
An outstanding concern of mine is whether clicking off the board and then back on it works properly. From personal experience yesterday, I noticed this was a bit glitchy. E.g., I think I had clicked off the board, and then after trying to click back on it a few times, the ctrl-z function (to clear drawings) didn't work. I'm not sure if anyone has insight into whether this PR would affect this, but just wanted to mention it.
If we merge this, we should probably close all issues made in chessground and lila, so that in case anyone still experiences bugs, they don't feel they'd be making a duplicate issue.