There is this game where players can rotate cards, then drag them to place them on the board. The current code uses BGA's framework (undocumented?) "rotateTo" and draggable. I checked the code of rotateTo, and it just applies a transform rotate style with an animation, nothing fancy.
Now, this works perfectly fine in Firefox. However, in Chrome and Edge, when the card is rotated, as soon as the drag begins it disappears. Following the recommendations on the studio doc, I've tried to migrate the code to the standard drag and drop API. Again, it works fine in Firefox, but in Chrome, when dragging the rotated card, the drag image shows the card straight, without any rotation.
Searching the web, I found this guy who had the same issue. The solution offered is quite depressing (implement my own drag'n drop code).
When searching, I found many other issues with dragging transformed elements. So, any chance to make this work with the drag and drop API or should I implement my own drag and drop code?
Now, this works perfectly fine in Firefox. However, in Chrome and Edge, when the card is rotated, as soon as the drag begins it disappears. Following the recommendations on the studio doc, I've tried to migrate the code to the standard drag and drop API. Again, it works fine in Firefox, but in Chrome, when dragging the rotated card, the drag image shows the card straight, without any rotation.
Searching the web, I found this guy who had the same issue. The solution offered is quite depressing (implement my own drag'n drop code).
When searching, I found many other issues with dragging transformed elements. So, any chance to make this work with the drag and drop API or should I implement my own drag and drop code?