Skip to content

Commit

Permalink
activate template fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
TRMSC committed Nov 2, 2023
1 parent eec2b39 commit fd313df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/src/script.js
Original file line number Diff line number Diff line change
@@ -319,7 +319,6 @@ generateScene = () => {
let templateName = document.getElementById('imagescene-template').value;
let templatePath = '../templates/' + templateName + '.svg';

/*
// Fetch template content
fetch(templatePath)
.then(response => {
@@ -339,10 +338,9 @@ generateScene = () => {
.catch(error => {
console.error('Fetch error:', error);
});
*/

// TEMPORARY: Usage of a dummy code
let templateContent = '<svg id="example"><image width="$WIDTH" height="$HEIGHT" alt="$ALT" xlink:href="$URL" /></svg>';
// let templateContent = '<svg id="example"><image width="$WIDTH" height="$HEIGHT" alt="$ALT" xlink:href="$URL" /></svg>';

// Replace placeholders
templateContent = templateContent.replace(/\$URL/g, url);

0 comments on commit fd313df

Please sign in to comment.