Skip to content

Commit

Permalink
fix(pb-tify): make sure container div is created
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmm committed Mar 23, 2024
1 parent 1a6088c commit e96f4f2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pb-tify.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export class PbTify extends pbMixin(LitElement) {

_injectStylesheet(this.cssPath);

this._container = document.createElement('div');
this._container.style.height = '100%';
this._container.style.width = '100%';
this.appendChild(this._container);

this.subscribeTo('pb-show-annotation', (ev) => {
if (ev.detail) {
this._initialPages = ev.detail.order ? Number(ev.detail.order) : Number.POSITIVE_INFINITY;
Expand All @@ -81,11 +86,6 @@ export class PbTify extends pbMixin(LitElement) {
super.firstUpdated();

waitOnce('pb-page-ready', () => {
this._container = document.createElement('div');
this._container.style.height = '100%';
this._container.style.width = '100%';
this.appendChild(this._container);

this._initViewer();
});
}
Expand Down

0 comments on commit e96f4f2

Please sign in to comment.