Skip to content

Commit

Permalink
Sample text input now updates all renders
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorp committed Feb 6, 2024
1 parent 842a81d commit c937da7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/fencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,13 @@ function clickControls(e) {

}

function sampleTextChange(e) {

Qall(".render").forEach(renderEl => {
renderEl.innerText = e.target.value;
});
}

function addMapping() {

const from = [];
Expand Down Expand Up @@ -478,6 +485,8 @@ function initFencer() {

// set up the mouse move event
GLOBAL.svgEl.onmousemove = svgMouseMove;

Q("#sample-text").oninput = sampleTextChange;


//const svgEl = document.querySelector(".mappings-svg");
Expand Down

0 comments on commit c937da7

Please sign in to comment.