Skip to content

Commit

Permalink
handle VisB text updates of foreignObject as HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
cobizobi committed Sep 4, 2024
1 parent 3bc2117 commit 3f933d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/resources/de/prob2/ui/visb/visb_html_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@

function changeElementAttribute(element, attribute, value) {
if (attribute === "text") {
element.textContent = value;
if (element.tagName === 'foreignObject') {
element.innerHTML = value;
} else {
element.textContent = value;
}
} else if (attribute === "class" && value !== "") {
if(value[0] === "+") {
element.classList.add(value.substr(1));
Expand Down

0 comments on commit 3f933d0

Please sign in to comment.