Skip to content

Commit

Permalink
Deploying to gh-pages from @ b8affa7 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rg-wood committed Apr 5, 2024
1 parent 15b0d07 commit 8ce9bfe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<body>
<h2>One-column random table</h2>

<vellum-random-table select="#result">
<vellum-random-table select="#result" preroll>
<caption>
Random Encounters
</caption>
Expand Down
9 changes: 9 additions & 0 deletions vellum-random-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,15 @@

// src/vellum-random-table.ts
var VellumRandomTable = class extends s3 {
constructor() {
super(...arguments);
this.preroll = false;
}
connectedCallback() {
super.connectedCallback();
this.button.addEventListener("click", () => this.roll());
if (this.preroll)
this.roll();
}
get mode() {
if (this.table.rows[0].cells.length == 2) {
Expand Down Expand Up @@ -746,6 +752,9 @@
__decorateClass([
n4()
], VellumRandomTable.prototype, "select", 2);
__decorateClass([
n4({ type: Boolean })
], VellumRandomTable.prototype, "preroll", 2);
VellumRandomTable = __decorateClass([
t3("vellum-random-table")
], VellumRandomTable);
Expand Down

0 comments on commit 8ce9bfe

Please sign in to comment.