From 5c1b0fbf6216b2e3a30e6e556ea1fcd14138208e Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 4 Dec 2024 11:19:58 +0100 Subject: [PATCH] update index --- www/index.html | 121 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 111 insertions(+), 10 deletions(-) diff --git a/www/index.html b/www/index.html index de0552b..e32aa6f 100644 --- a/www/index.html +++ b/www/index.html @@ -2703,6 +2703,10 @@ }, "resetPreview" : function(el) { return new Promise(function(resolve, reject) { + if (el.contentDocument.childNodes[0].innerText == "") { + resolve(el); + return; + } var newRunner = el.cloneNode(false); newRunner.addEventListener("load", function() { resolve(newRunner); @@ -2832,6 +2836,7 @@ } simplyApp.commands.codeMirrorInit(); simplyApp.commands.autoRunTests(); + simplyApp.commands.autoRunPreviews(); }, "collapseMenu" : function(el) { if (!el.hasAttribute("open")) { @@ -3167,11 +3172,6 @@ editor.pageData.parts = parts; editor.pageData.count = count; editor.pageData.page = "Edit component"; - }) - .then(function() { - setTimeout(function() { // FIXME: Wait for the CSS to be available; - simplyApp.commands.autoRunPreviews(); - }, 1000); }); }, "#pages/:component" : function(params) { @@ -3218,11 +3218,6 @@ editor.pageData.parts = parts; editor.pageData.count = count; editor.pageData.page = "Edit page"; - }) - .then(function() { - setTimeout(function() { // FIXME: Wait for the CSS to be available; - simplyApp.commands.autoRunPreviews(); - }, 1000); }); }, "#base" : function() { @@ -4499,6 +4494,21 @@

Edit base component:

+ + +