Skip to content

Commit

Permalink
fix: Fix missing borderline (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
vn7n24fzkq committed Mar 8, 2023
1 parent fe6a8e8 commit f874cca
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/templates/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ export class Card {
font-family: 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif
}`
);
const strokeWidth = 1;
this.svg
.append('rect')
.attr('x', 1.5)
.attr('y', 1.5)
.attr('x', 1)
.attr('y', 1)
.attr('rx', 5)
.attr('ry', 5)
.attr('height', '100%')
.attr('width', '100%')
// 100% - 2px to show borderline
.attr('height', `${(height - 2 * strokeWidth) / height}%`)
// 100% - 2px to show borderline
.attr('width', `${(width - 2 * strokeWidth) / width}%`)
.attr('stroke', `${theme.stroke}`)
.attr('stroke-width', '1')
.attr('stroke-width', strokeWidth)
.attr('fill', `${theme.background}`)
.attr('stroke-opacity', `${theme.strokeOpacity}`);

Expand Down

0 comments on commit f874cca

Please sign in to comment.