refactor whiteboard storage
This commit is contained in:
parent
8bd4bef6f6
commit
23274299bf
@ -22,7 +22,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(tool==="line" || tool==="pen" || tool==="rect" || tool==="circle" || tool==="eraser" || tool==="addImgBG" || tool==="recSelect" || tool==="eraseRec") { //Save all this actions
|
} else if(["line", "pen", "rect", "circle", "eraser", "addImgBG", "recSelect", "eraseRec"].includes(tool)) { //Save all this actions
|
||||||
if(!savedBoards[wid]) {
|
if(!savedBoards[wid]) {
|
||||||
savedBoards[wid] = [];
|
savedBoards[wid] = [];
|
||||||
}
|
}
|
||||||
@ -31,9 +31,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadStoredData : function(wid) { //Load saved whiteboard
|
loadStoredData : function(wid) { //Load saved whiteboard
|
||||||
if(!savedBoards[wid]) {
|
return savedBoards[wid] ? savedBoards[wid] : [];
|
||||||
return [];
|
|
||||||
}
|
|
||||||
return savedBoards[wid];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user