Skip to content

Commit

Permalink
fix: Fix card height and width in wrong percentage (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
vn7n24fzkq authored Mar 8, 2023
1 parent 11a2c1d commit 0bf9b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templates/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export class Card {
.attr('rx', 5)
.attr('ry', 5)
// 100% - 2px to show borderline
.attr('height', `${(height - 2 * strokeWidth) / height}%`)
.attr('height', `${((height - 2 * strokeWidth) / height) * 100}%`)
// 100% - 2px to show borderline
.attr('width', `${(width - 2 * strokeWidth) / width}%`)
.attr('width', `${((width - 2 * strokeWidth) / width) * 100}%`)
.attr('stroke', `${theme.stroke}`)
.attr('stroke-width', strokeWidth)
.attr('fill', `${theme.background}`)
Expand Down

0 comments on commit 0bf9b0a

Please sign in to comment.