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
8 changes: 6 additions & 2 deletions src/patchmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class Patchmap extends WildcardEventEmitter {
return this._viewport;
}

set viewport(value) {
this._viewport = value;
}

get theme() {
return this._theme.get();
}
Expand Down Expand Up @@ -123,7 +127,7 @@ class Patchmap extends WildcardEventEmitter {
this._theme.set(themeOptions);
this._app = new Application();
await initApp(this.app, { resizeTo: element, ...appOptions });
this._viewport = initViewport(this.app, viewportOptions);
this.viewport = initViewport(this.app, viewportOptions);
await initAsset(assetsOptions);
initCanvas(element, this.app);

Expand All @@ -150,7 +154,7 @@ class Patchmap extends WildcardEventEmitter {
if (this._resizeObserver) this._resizeObserver.disconnect();

this._app = null;
this._viewport = null;
this.viewport = null;
this._resizeObserver = null;
this.isInit = false;
this._theme = themeStore();
Expand Down