Skip to content

Commit

Permalink
fix: Opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Mar 4, 2024
1 parent d3ee699 commit d77ff8d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webapp/src/components/AssetImage/EnsImage/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ export async function drawImage(
ctx.textAlign = 'center'
ctx.textBaseline = 'middle'
const dclEthYPosition = nameYPosition + 30 // Position "DCL.ETH" below the name
ctx.globalAlpha = 0.7
ctx.fillText('DCL.ETH', width / 2, dclEthYPosition)
ctx.globalAlpha = 1
} catch (e) {
console.error('Error loading fonts', e)
}
Expand All @@ -117,13 +119,17 @@ export async function drawImage(
const logoYPosition = onlyLogo
? height / 2 - logoHeight / 2
: nameYPosition - logoHeight - 25 // Adjust space above the name
if (!onlyLogo) {
ctx.globalAlpha = 0.5
}
ctx.drawImage(
await promiseOfALogo,
logoXPosition,
logoYPosition,
logoWidth,
logoHeight
)
ctx.globalAlpha = 1
} catch (e) {
console.error('Error loading logo', e)
}
Expand Down

0 comments on commit d77ff8d

Please sign in to comment.