From 64e02bf4113a90bbaa6332e6127d019c55383670 Mon Sep 17 00:00:00 2001 From: Philipp Schaad Date: Wed, 30 Oct 2024 16:42:24 +0100 Subject: [PATCH] Allow initialization with different contents container --- src/sdfv.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sdfv.ts b/src/sdfv.ts index 38241cd..0350e76 100644 --- a/src/sdfv.ts +++ b/src/sdfv.ts @@ -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,