ee-in commited on
Commit
3fbbdb8
·
verified ·
1 Parent(s): ad343f8

散 is at the center, not 心, at present.

Browse files
Files changed (1) hide show
  1. script.js +7 -8
script.js CHANGED
@@ -32,8 +32,8 @@ const fullGrid = [
32
  ];
33
  // Character information with meanings
34
  const characterInfo = {
35
- "": { pinyin: "xīn", meaning: "Heart; Mind; Core essence; Central consciousness", color: "red" },
36
- "仁": { pinyin: "rén", meaning: "Benevolence; Kindness; Humanity; Human-heartedness", color: "red" },
37
  "智": { pinyin: "zhì", meaning: "Wisdom; Knowledge; Consciousness; Insight", color: "red" },
38
  "懷": { pinyin: "huái", meaning: "Embrace; Cherish; Nostalgic feelings; Reminiscence", color: "red" },
39
  "德": { pinyin: "dé", meaning: "Virtue; Moral character; Excellence; Inherent nature", color: "red" },
@@ -117,9 +117,8 @@ function initPoemGrid() {
117
  poemGrid.appendChild(cell);
118
  });
119
  });
120
-
121
  // Set initial center character
122
- selectCharacter("", 15, 15);
123
  }
124
 
125
  // Select a character and display its details
@@ -132,8 +131,8 @@ function selectCharacter(char, row, col) {
132
 
133
  selectedChar.textContent = char;
134
  pinyin.textContent = charData.pinyin;
135
- position.textContent = row === 15 && col === 15 ? 'Center ()' : `Row ${row}, Column ${col}`;
136
- meaning.textContent = charData.meaning;
137
  }
138
 
139
  // Add character to constructed poem
@@ -165,8 +164,8 @@ function toggleCenter() {
165
  showCenterHeart = !showCenterHeart;
166
  const cells = document.querySelectorAll('[data-row="15"][data-col="15"]');
167
  cells.forEach(cell => {
168
- cell.style.boxShadow = showCenterHeart ? '0 0 0 3px rgba(199, 60, 29, 0.5)' : 'none';
169
- });
170
  toggleCenterBtn.textContent = showCenterHeart ? 'Hide Center ❤' : 'Show Center ❤';
171
  }
172
 
 
32
  ];
33
  // Character information with meanings
34
  const characterInfo = {
35
+ "": { pinyin: "sàn", meaning: "Scatter; Disperse; Break up; Relax", color: "red" },
36
+ "仁": { pinyin: "rén", meaning: "Benevolence; Kindness; Humanity; Human-heartedness", color: "red" },
37
  "智": { pinyin: "zhì", meaning: "Wisdom; Knowledge; Consciousness; Insight", color: "red" },
38
  "懷": { pinyin: "huái", meaning: "Embrace; Cherish; Nostalgic feelings; Reminiscence", color: "red" },
39
  "德": { pinyin: "dé", meaning: "Virtue; Moral character; Excellence; Inherent nature", color: "red" },
 
117
  poemGrid.appendChild(cell);
118
  });
119
  });
 
120
  // Set initial center character
121
+ selectCharacter("", 15, 15);
122
  }
123
 
124
  // Select a character and display its details
 
131
 
132
  selectedChar.textContent = char;
133
  pinyin.textContent = charData.pinyin;
134
+ position.textContent = row === 15 && col === 15 ? 'Center ()' : `Row ${row}, Column ${col}`;
135
+ meaning.textContent = charData.meaning;
136
  }
137
 
138
  // Add character to constructed poem
 
164
  showCenterHeart = !showCenterHeart;
165
  const cells = document.querySelectorAll('[data-row="15"][data-col="15"]');
166
  cells.forEach(cell => {
167
+ cell.style.boxShadow = showCenterHeart ? '0 0 0 3px rgba(199, 60, 29, 0.5)' : 'none';
168
+ });
169
  toggleCenterBtn.textContent = showCenterHeart ? 'Hide Center ❤' : 'Show Center ❤';
170
  }
171