fixed and sorted/added comments to L-System
This commit is contained in:
10
liberay.html
10
liberay.html
@@ -30,7 +30,13 @@
|
||||
const sketches = sketchList.split(',');
|
||||
for (let sketch of sketches) {
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = `loader.html?sketch=${encodeURIComponent(sketch)}`;
|
||||
iframe.src = `loader.html?sketches=${encodeURIComponent(sketch.trim())}`;
|
||||
iframe.onload = () => {
|
||||
console.log(`Loaded iframe for ${sketch}`);
|
||||
};
|
||||
iframe.onerror = () => {
|
||||
console.error(`Failed to load iframe for ${sketch}`);
|
||||
};
|
||||
// Apply size if provided
|
||||
if (sketchSize) {
|
||||
iframe.style.width = sketchSize + 'px';
|
||||
@@ -41,6 +47,8 @@
|
||||
}
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
} else {
|
||||
console.error('No sketches parameter provided');
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user