Update index.html
Browse files- index.html +3 -2
index.html
CHANGED
|
@@ -50,8 +50,9 @@
|
|
| 50 |
display: flex;
|
| 51 |
align-items: center;
|
| 52 |
justify-content: center;
|
| 53 |
-
aspect-ratio: 1 / 1;
|
| 54 |
transition: transform 0.3s ease-in-out;
|
|
|
|
| 55 |
}
|
| 56 |
|
| 57 |
.cell-text {
|
|
@@ -1762,7 +1763,7 @@
|
|
| 1762 |
gridHtml += `
|
| 1763 |
<div class="grid-cell" style="position: relative; ${borderStyle} background-color: transparent; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
| 1764 |
${innerBg}
|
| 1765 |
-
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform: rotate(${cell.rotation}deg); z-index: 1; position: relative;">
|
| 1766 |
${contentHtml}
|
| 1767 |
</div>
|
| 1768 |
</div>
|
|
|
|
| 50 |
display: flex;
|
| 51 |
align-items: center;
|
| 52 |
justify-content: center;
|
| 53 |
+
/* aspect-ratio: 1 / 1; REMOVED: This caused centering issues on non-square cells */
|
| 54 |
transition: transform 0.3s ease-in-out;
|
| 55 |
+
transform-origin: center center; /* Ensure rotation happens exactly in the middle */
|
| 56 |
}
|
| 57 |
|
| 58 |
.cell-text {
|
|
|
|
| 1763 |
gridHtml += `
|
| 1764 |
<div class="grid-cell" style="position: relative; ${borderStyle} background-color: transparent; display: flex; align-items: center; justify-content: center; overflow: hidden;">
|
| 1765 |
${innerBg}
|
| 1766 |
+
<div style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform: rotate(${cell.rotation}deg); transform-origin: center center; z-index: 1; position: relative;">
|
| 1767 |
${contentHtml}
|
| 1768 |
</div>
|
| 1769 |
</div>
|