Skip to content

Commit

Permalink
feat!: watermark vertically centered
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohe0601 committed Oct 21, 2024
1 parent 5f017cb commit 624a268
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/src/watermark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,13 @@ export class Watermark {
itemEl.style.position = "absolute";
itemEl.style.top = `${y}px`;
itemEl.style.left = `${x}px`;
itemEl.style.display = "flex";
itemEl.style.alignItems = "center";
itemEl.style.justifyContent = "center";
itemEl.style.width = `${this._options.itemWidth}px`;
itemEl.style.height = `${this._options.itemHeight}px`;
itemEl.style.fontSize = this._options.fontSize;
itemEl.style.fontFamily = this._options.fontFamily;
itemEl.style.textAlign = "center";
itemEl.style.color = this._options.color;
itemEl.style.opacity = `${this._options.opacity}`;
itemEl.style.transform = `rotate(-${this._options.angle}deg)`;
Expand Down

0 comments on commit 624a268

Please sign in to comment.