2017-04-20 02:27:00 +08:00
|
|
|
import { callServer } from '/imports/ui/services/api/index.js';
|
2017-05-03 08:05:41 +08:00
|
|
|
import Storage from '/imports/ui/services/storage/session';
|
2017-04-20 02:27:00 +08:00
|
|
|
|
2017-05-11 02:59:17 +08:00
|
|
|
const undoAnnotation = (whiteboardId) => {
|
|
|
|
callServer('undoAnnotation', whiteboardId);
|
2017-04-20 02:27:00 +08:00
|
|
|
};
|
|
|
|
|
2017-05-11 02:59:17 +08:00
|
|
|
const clearWhiteboard = (whiteboardId) => {
|
|
|
|
callServer('clearWhiteboard', whiteboardId);
|
2017-04-22 02:01:52 +08:00
|
|
|
};
|
2017-04-20 02:27:00 +08:00
|
|
|
|
2017-06-03 07:46:02 +08:00
|
|
|
const setWhiteboardToolbarValues = (tool, thickness, color, fontSize) => {
|
|
|
|
let drawSettings = {
|
|
|
|
whiteboardAnnotationTool: tool,
|
|
|
|
whiteboardAnnotationThickness: thickness,
|
|
|
|
whiteboardAnnotationColor: color,
|
|
|
|
textFontSize: fontSize,
|
|
|
|
};
|
|
|
|
Storage.setItem('drawSettings', JSON.stringify(drawSettings));
|
2017-05-03 08:05:41 +08:00
|
|
|
};
|
|
|
|
|
2017-04-20 02:27:00 +08:00
|
|
|
export default {
|
|
|
|
undoAnnotation,
|
2017-04-22 02:01:52 +08:00
|
|
|
clearWhiteboard,
|
2017-05-03 08:05:41 +08:00
|
|
|
setWhiteboardToolbarValues,
|
2017-04-20 02:27:00 +08:00
|
|
|
};
|