#95282: "Tiles display incorrectly if the CSS "rotate" property is not supported"
What is this report about?
Petra a zo c'hoarvezet ? Trugarez evit dibab amañ dindan
Deskrivadur dre ar munud
• Mar-plij, diskrivit kudenn an diskwel. M'ho peus un dapadenn skramm eus ar gudenn (ho pezit soñj d'eus se !), gellout a rit implij Imgur.com evit e bellgargañ hag eilañ/pegañ al liamm amañ.
NOTE: This _might_ be the root cause of boardgamearena.com/bug?id=92210
# Problem
If the user's browser does not yet support the "rotate" property, then when placing tiles the image
will not rotate.
The game data gets updated with a rotation (0°, 90°, 180°, 270°) but the image will remain unrotated
(0°) hence it looks like the tile is not rotated; this improper feedback causes confusion and can even
caue improper placement (if they wrongly believe they have NOT rotated).
# The Fix
Simply adding the proper `transform:rotate()` lines, shown below, to these CSS classes will fix this
problem:
.sag_tile-rot-90 {
rotate: 90deg;
transform: rotate(90deg);
}
.sag_tile-rot-180 {
rotate: 180deg;
transform: rotate(180deg);
}
.sag_tile-rot-270 {
rotate: 270deg;
transform: rotate(270deg);
}
# Reference
Support for the rotate _attribute_ is barely 12 months old for many browsers.
See: developer.mozilla.org/en-US/docs/Web/CSS/rotate#browser_compatibility
And: developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate#browser_compatibility
• Peseurt merdeer eo hoc'h hini ?
Google Chrome v103 and v115
Roll-istor an danevelloù bog
I tried this today, using BGA's CSS override option. It allowed me to rotate in an older version of chrome on an older mac that won't update chrome to the latest. It also allowed me to rotate on safari on my iPhone which is not on the latest annual update.
However, the rotation order was strange and would point up (single "1" blue tile with 1 blue arrow) when it should have been another orientation, as I cycled through the options. I committed the tile where it should have been automatically satisfied (pointing up to blue), but it didn't move the token. I then checked on a laptop with the latest macOS after removing the CSS override and see that the tile is not as it visually looked when I placed it (with the CSS override). So the visual and the actual were out of sync with just the addition of this code, at least using the common BGA CSS override in the profile.
Thanks for putting this out there in an attempt to correct what really needs to be implemented and tested directly into the game code.
Ouzhpennañ un dra bennak d'an danevell-mañ
- Niverenn taol all / Niverenn ar fiñv
- Ha renket eo bet ar gudenn gant an douchenn F5 ?
- Ha c'hoarvezet eo ar gudenn meur a wech ? Bewech ? Cheñch-dicheñch ?
- M'ho peus un dapadenn skramm eus ar gudenn (ho pezit soñj d'eus se !), gellout a rit implij Imgur.com evit e bellgargañ hag eilañ/pegañ al liamm amañ.