bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-toolbar/service.js

27 lines
705 B
JavaScript
Raw Normal View History

2017-06-08 04:45:49 +08:00
import { makeCall } from '/imports/ui/services/api';
import Storage from '/imports/ui/services/storage/session';
2017-04-20 02:27:00 +08:00
const undoAnnotation = (whiteboardId) => {
2017-06-08 04:45:49 +08:00
makeCall('undoAnnotation', whiteboardId);
2017-04-20 02:27:00 +08:00
};
const clearWhiteboard = (whiteboardId) => {
2017-06-08 04:45:49 +08:00
makeCall('clearWhiteboard', whiteboardId);
2017-04-22 02:01:52 +08:00
};
2017-04-20 02:27:00 +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-04-20 02:27:00 +08:00
export default {
undoAnnotation,
2017-04-22 02:01:52 +08:00
clearWhiteboard,
setWhiteboardToolbarValues,
2017-04-20 02:27:00 +08:00
};