added additional information to pecs in library

This commit is contained in:
2025-08-18 11:26:38 -06:00
parent 167cefea3f
commit 85b595f35d
2 changed files with 4 additions and 5 deletions

View File

@@ -148,15 +148,15 @@ repopGrid(app.currentBoard);
// Populate Library // Populate Library
app.library = []; app.library = [];
app.library.push(new pec("No","")); app.library.push(new pec("No","images/cards_conversation_no.svg"));
app.library.push(new pec("Up","")); app.library.push(new pec("Up",""));
app.library.push(new pec("More","")); app.library.push(new pec("More",""));
app.library.push(new pec("Drink","")); app.library.push(new pec("Drink","images/cards_food_thirsty.svg"));
app.library.push(new pec("Food","")); app.library.push(new pec("Food","images/cards_food_hungry.svg"));
// add more here // add more here
app.library.forEach((p,i)=>{ app.library.forEach((p,i)=>{
var newPec = document.createElement("span"); var newPec = document.createElement("span");
newPec.classList.add("pecSlot"); newPec.classList.add("libSlot");
newPec.innerText = p.word; newPec.innerText = p.word;
newPec.id = "lPec"+i; newPec.id = "lPec"+i;
newPec.addEventListener("click", useThisPec); newPec.addEventListener("click", useThisPec);

View File

@@ -5,7 +5,6 @@ class pec {
var me = this; var me = this;
this.word = "string" == typeof word ? word : "Empty"; this.word = "string" == typeof word ? word : "Empty";
this.image = image; // Add image processing here this.image = image; // Add image processing here
this.utterance = new SpeechSynthesisUtterance(this.word);
var root = document.createElement("div"); var root = document.createElement("div");
root.draggable = true; root.draggable = true;
root.classList.add("pec"); root.classList.add("pec");