Implement interactive pushpins and drag-to-connect red yarn webbing for Evidence Board
This commit is contained in:
1 parent
760ba2ff53
commit
ac0c3bdf79
5 files changed
+515
-148
No files matched your search
+4
-1
@@ -83,6 +83,7 @@ function readDeskState() {
|
||||
cards: desk.cards || [],
|
||||
props: desk.props || [],
|
||||
strokes: desk.strokes || [],
|
||||
yarnLinks: desk.yarnLinks || [],
|
||||
settings: desk.settings || {}
|
||||
}
|
||||
};
|
||||
@@ -155,7 +156,7 @@ app.get('/api/desk', (_req, res) => {
|
||||
|
||||
// Save desk state
|
||||
app.post('/api/desk', (req, res) => {
|
||||
const { cards, props, strokes, settings, activeBoard, boards, originClientId } = req.body;
|
||||
const { cards, props, strokes, yarnLinks, settings, activeBoard, boards, originClientId } = req.body;
|
||||
|
||||
if (!Array.isArray(cards)) {
|
||||
return res.status(400).json({ success: false, error: 'Invalid desk state: cards required' });
|
||||
@@ -167,6 +168,7 @@ app.post('/api/desk', (req, res) => {
|
||||
cards,
|
||||
props: Array.isArray(props) ? props : [],
|
||||
strokes: Array.isArray(strokes) ? strokes : [],
|
||||
yarnLinks: Array.isArray(yarnLinks) ? yarnLinks : (updatedBoards[currentBoard]?.yarnLinks || []),
|
||||
settings: settings || {}
|
||||
};
|
||||
|
||||
@@ -174,6 +176,7 @@ app.post('/api/desk', (req, res) => {
|
||||
cards,
|
||||
props: Array.isArray(props) ? props : [],
|
||||
strokes: Array.isArray(strokes) ? strokes : [],
|
||||
yarnLinks: Array.isArray(yarnLinks) ? yarnLinks : [],
|
||||
settings: settings || {},
|
||||
activeBoard: currentBoard,
|
||||
boards: updatedBoards,
|
||||
|
||||
Reference in new issue
Block a user