mirror of
https://forge.murkfall.net/bluesaxman/librePECS.git
synced 2026-03-13 10:14:20 -06:00
added additional information to pecs in library
This commit is contained in:
8
main.js
8
main.js
@@ -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);
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user