-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Touch not working #5
Comments
Currently, I am using Node.js version 14.17.5. I am not sure if that could be the source of your issue. Regarding the placement of pieces, I don't quite understand what you are referring to. To move the pieces, you need to click on the list of countries and then click on the map in the correct location. In touch mode for mobile devices, it works similarly, but of course, the piece is not dragged since there is no mouse. |
Thanks, any way to have the piece dragged by touch when touching it and panning the map when not touching the pieces? I am getting this error now. Its return type 'ReactNode' is not a valid JSX element.
I appreciate your help! |
The error message "Its return type 'ReactNode' is not a valid JSX element" typically means that the component is returning a type that React does not recognize as a valid JSX element. Specifically, Here’s a breakdown of what might be causing this issue and how you can troubleshoot it:
If you are not sure which component exactly is causing the problem, try isolating the issue by removing components or adding them back one at a time. Here’s how you can attempt to reproduce and identify the problem:
If after these steps you still encounter issues, providing more code or a more detailed context might help in pinpointing the exact problem. |
It seems like you're experiencing an issue with touch functionality for placing pieces. Let me explain the current behavior and why implementing a different type of drag-and-drop might not be feasible with the current setup. Currently, the functionality works as follows:
In the current implementation, the pieces are not directly on the map. Instead, they are part of a layer that follows the cursor. This design means that the pieces are not interactable on the map itself but are always relative to the cursor’s position. Changing this behavior to allow a different type of drag-and-drop would likely require significant changes to the core functionality, particularly in the CursorCore and AnimatedCursor functions. These functions are responsible for the cursor behavior and how pieces are attached to and moved with the cursor. Given this setup, implementing touch functionality to drag and drop pieces directly on the map, as you might be requesting, isn't straightforward with the current design. The pieces are not elements on the map but are part of the cursor’s layer, making the requested behavior difficult to achieve without a major overhaul. I hope this clarifies the situation. If you have any other questions or need further assistance, feel free to ask! |
Hello,
Does touch work to place the pieces? It seems to only work to zoom in and out but not to move and place the pieces?
Also, I have installed node 14.7.3 and am getting errors when building. Is that the only requirement to build?
Thanks
The text was updated successfully, but these errors were encountered: