bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-toolbar/container.jsx
Pedro Beschorner Marin 92d3300d81 Handle multi-user whiteboard for solo presenter
Adjusts the user interface to keep coherence when activating the multi-user
whiteboard while there is only the presenter in the meeting.
2021-03-18 14:53:11 -03:00

38 lines
1.6 KiB
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import WhiteboardService from '/imports/ui/components/whiteboard/service';
import WhiteboardToolbarService from './service';
import WhiteboardToolbar from './component';
const WhiteboardToolbarContainer = props => (
<WhiteboardToolbar {...props} />
);
export default withTracker((params) => {
const { whiteboardId } = params;
const data = {
actions: {
undoAnnotation: WhiteboardToolbarService.undoAnnotation,
clearWhiteboard: WhiteboardToolbarService.clearWhiteboard,
addWhiteboardGlobalAccess: WhiteboardService.addGlobalAccess,
removeWhiteboardGlobalAccess: WhiteboardService.removeGlobalAccess,
setInitialWhiteboardToolbarValues: WhiteboardToolbarService.setInitialWhiteboardToolbarValues,
getCurrentDrawSettings: WhiteboardToolbarService.getCurrentDrawSettings,
setFontSize: WhiteboardToolbarService.setFontSize,
setTool: WhiteboardToolbarService.setTool,
setThickness: WhiteboardToolbarService.setThickness,
setColor: WhiteboardToolbarService.setColor,
setTextShapeObject: WhiteboardToolbarService.setTextShapeObject,
},
textShapeActiveId: WhiteboardToolbarService.getTextShapeActiveId(),
multiUser: WhiteboardService.isMultiUserActive(whiteboardId),
isPresenter: WhiteboardToolbarService.isPresenter(),
annotations: WhiteboardToolbarService.filterAnnotationList(),
isMeteorConnected: Meteor.status().connected,
multiUserSize: WhiteboardService.getMultiUserSize(whiteboardId),
};
return data;
})(WhiteboardToolbarContainer);