Fix seatmap slot matching and update member modal layout
This commit is contained in:
@@ -1308,11 +1308,59 @@ def build_center_chair_viewer_html(layout: dict[str, object]) -> str:
|
||||
ctx.lineWidth = (selected ? 2.6 : active ? 2.0 : 1.6) / camera.scale;""",
|
||||
1,
|
||||
)
|
||||
html = html.replace(
|
||||
""" sorted.forEach((chair, index) => {
|
||||
chair.key = String(index + 1);
|
||||
chair.seatNo = index + 1;
|
||||
});""",
|
||||
""" sorted.forEach((chair, index) => {
|
||||
chair.seatNo = index + 1;
|
||||
});""",
|
||||
1,
|
||||
)
|
||||
html = html.replace(
|
||||
"function persistPlaced() {\n localStorage.setItem(STORAGE_KEY, JSON.stringify([...placed]));\n }",
|
||||
"function persistPlaced() {\n return;\n }",
|
||||
1,
|
||||
)
|
||||
html = html.replace(
|
||||
""" window.addEventListener("pointerup", (event) => {
|
||||
if (dragging && dragStart) {
|
||||
const move = Math.hypot(event.clientX - dragStart.x, event.clientY - dragStart.y);
|
||||
if (move < 4) {
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const picked = pickChair(event.clientX - rect.left, event.clientY - rect.top);
|
||||
if (picked) {
|
||||
if (placed.has(picked.key)) placed.delete(picked.key);
|
||||
else placed.add(picked.key);
|
||||
persistPlaced();
|
||||
if (activePersonId) {
|
||||
const currentChair = getChairByPerson(activePersonId);
|
||||
if (chairAssignments[picked.key] === activePersonId) {
|
||||
delete chairAssignments[picked.key];
|
||||
} else {
|
||||
if (currentChair && currentChair !== picked.key) delete chairAssignments[currentChair];
|
||||
chairAssignments[picked.key] = activePersonId;
|
||||
}
|
||||
persistAssignments();
|
||||
renderPeopleList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dragging = false;
|
||||
dragStart = null;
|
||||
canvas.classList.remove("dragging");
|
||||
requestDraw();
|
||||
});""",
|
||||
""" window.addEventListener("pointerup", () => {
|
||||
dragging = false;
|
||||
dragStart = null;
|
||||
canvas.classList.remove("dragging");
|
||||
requestDraw();
|
||||
});""",
|
||||
1,
|
||||
)
|
||||
html = html.replace(
|
||||
""" window.addEventListener("pointerup", (event) => {
|
||||
if (dragging && dragStart) {
|
||||
|
||||
Reference in New Issue
Block a user