Skip to content

Commit

Permalink
Still trying to add data
Browse files Browse the repository at this point in the history
  • Loading branch information
GenZerg committed Oct 17, 2023
1 parent fbb6074 commit 96bfa2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,13 @@ class ARMMane{

preset.steps.forEach(step => {
const newDiv = this.cloneCodeBlockElement(newPresetElement); // Pass newPresetElement as an argument
const data = this.translateInstruction(step);
this.attachCodeBlockEventListeners(newDiv, newPresetElement); // Pass newPresetElement as well
newDiv.querySelector(".cmd-text > div > h2").textContent = this.translateInstruction(step);
newDiv.setAttribute("data-type", data.type);
newDiv.setAttribute("data-device", data.id);
newDiv.setAttribute("data-value", data.degree);
newDiv.setAttribute("data-speed", data.speed);
swimLane.appendChild(newDiv);
});
}
Expand Down

0 comments on commit 96bfa2b

Please sign in to comment.