Skip to content

Commit

Permalink
Allow initialization with different contents container
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Oct 30, 2024
1 parent a537662 commit 64e02bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sdfv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,11 @@ export class WebSDFV extends SDFV {
public setSDFG(
sdfg: JsonSDFG | null = null,
userTransform: DOMMatrix | null = null,
debugDraw: boolean = false
debugDraw: boolean = false,
contents_container_id: string = 'contents'
): void {
this.renderer?.destroy();
const container = document.getElementById('contents');
const container = document.getElementById(contents_container_id);
if (container && sdfg) {
const renderer = new SDFGRenderer(
sdfg, container, this, null, userTransform, debugDraw, null,
Expand Down

0 comments on commit 64e02bf

Please sign in to comment.