diff --git a/index.html b/index.html
index 03dca4d..0e26a98 100644
--- a/index.html
+++ b/index.html
@@ -1356,30 +1356,14 @@ window.addEventListener('load', function() {
// Set the diagram content
widget.setDiagram('business-process', drakonDiagram, null, true);
- // Position the widget in the container
- // The render() method creates a container with the canvas
- // We need to move it into our container
- setTimeout(function() {
- // The widget creates its own container - we need to extract the canvas
- var widgetContainer = widget.container || widget.canvas.parentElement;
- if (widgetContainer) {
- // Set explicit dimensions on our container
- canvasContainer.style.display = 'flex';
- canvasContainer.style.alignItems = 'center';
- canvasContainer.style.justifyContent = 'center';
- canvasContainer.style.overflow = 'hidden';
-
- // Try to append the widget's content
- if (widget.canvas && widget.canvas.parentElement) {
- // The canvas might already be in the DOM
- // Just ensure our container has the right size
- var rect = canvasContainer.getBoundingClientRect();
- if (rect.width === 0 || rect.height === 0) {
- canvasContainer.style.height = '400px';
- }
- }
- }
- }, 100);
+ // Append the widget's container (with canvas) to our #drakon-canvas element
+ if (widget.container) {
+ canvasContainer.appendChild(widget.container);
+ canvasContainer.style.display = 'flex';
+ canvasContainer.style.alignItems = 'center';
+ canvasContainer.style.justifyContent = 'center';
+ canvasContainer.style.overflow = 'hidden';
+ }
});
// ============================================