Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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