diff --git a/index.html b/index.html
index 689278d..e5f8cb8 100644
--- a/index.html
+++ b/index.html
@@ -270,6 +270,7 @@ button { font-family: inherit; cursor: pointer; border: none; background: none;
#drakon-canvas {
width: 100%;
height: 420px;
+ position: relative;
}
@media (max-width: 768px) {
@@ -1415,7 +1416,7 @@ function initDrakonDiagram() {
// Minimal view-only configuration
var config = {
- startEditContent: function () { /* read-only — no edit */ },
+ startEditContent: function () { /* read-only */ },
showContextMenu: function () { /* read-only */ },
canSelect: false,
maxWidth: 320,
@@ -1447,15 +1448,12 @@ function initDrakonDiagram() {
// Build widget
var drakonCanvas = document.getElementById('drakon-canvas');
var drakon = createDrakonWidget();
+ var WIDGET_W = 560;
+ var WIDGET_H = 420;
function rebuildWidget() {
- var rect = drakonCanvas.getBoundingClientRect();
drakonCanvas.innerHTML = '';
- var widgetEl = drakon.render(
- rect.width || 600,
- rect.height || 420,
- config
- );
+ var widgetEl = drakon.render(WIDGET_W, WIDGET_H, config);
drakonCanvas.appendChild(widgetEl);
}
@@ -1479,7 +1477,7 @@ function initDrakonDiagram() {
sender,
false
);
- }, 100);
+ }, 200);
// Handle resize
var resizeObserver = new ResizeObserver(function () {