Skip to content

Commit 1e2f231

Browse files
committed
fix: text positions on download in tier forge
1 parent 155d5df commit 1e2f231

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/app/apps/TierForge/TierForge.jsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,17 @@ const TierForge = () => {
263263
chart.style.overflow = 'visible';
264264
chart.style.height = 'auto';
265265
}
266+
267+
// Fix vertical alignment for text in capture (html2canvas often renders text lower)
268+
const labels = document.querySelectorAll('.tier-label-text');
269+
labels.forEach(label => {
270+
label.style.transform = 'translateY(-10px)'; // Nudge text up
271+
});
272+
273+
const items = document.querySelectorAll('.item-text-content');
274+
items.forEach(item => {
275+
item.style.transform = 'translateY(-4px)';
276+
});
266277
}
267278
});
268279

@@ -331,7 +342,7 @@ const TierForge = () => {
331342
<div className="flex items-center gap-2 px-3 py-2 bg-emerald-500/10 border border-emerald-500/20 rounded-sm animate-pulse">
332343
<InfoIcon weight="fill" className="text-emerald-500" size={12} />
333344
<span className="text-[10px] text-emerald-500 font-bold uppercase tracking-widest leading-none">
334-
Data Detected
345+
Saved Data Exists
335346
</span>
336347
</div>
337348
)}
@@ -399,4 +410,4 @@ const TierForge = () => {
399410
);
400411
};
401412

402-
export default TierForge;
413+
export default TierForge;

src/app/apps/TierForge/components/DraggableItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DraggableItem = ({ item, onDragStart, onDelete }) => {
1616
/>
1717
) : (
1818
<div className="w-full h-full grid place-items-center p-1 bg-[#111] text-white overflow-hidden">
19-
<span className="text-[10px] font-mono text-center break-words leading-tight w-full">
19+
<span className="item-text-content text-[10px] font-mono text-center break-words leading-tight w-full">
2020
{item.content}
2121
</span>
2222
</div>

src/app/apps/TierForge/components/TierRow.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const TierRow = ({
5151
style={{ backgroundColor: tier.color }}
5252
>
5353
<span
54-
className="text-black font-black text-xl md:text-3xl uppercase tracking-wider text-center select-none cursor-pointer break-words w-full"
54+
className="tier-label-text text-black font-black text-xl md:text-3xl uppercase tracking-wider text-center select-none cursor-pointer break-words w-full"
5555
style={{ textShadow: '0 2px 0 rgba(255,255,255,0.2)' }}
5656
onDoubleClick={openModal}
5757
>

0 commit comments

Comments
 (0)