bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-toolbar/container.jsx

42 lines
1.9 KiB
React
Raw Normal View History

2017-04-20 02:27:00 +08:00
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import WhiteboardService from '/imports/ui/components/whiteboard/service';
2017-04-20 02:27:00 +08:00
import WhiteboardToolbarService from './service';
import WhiteboardToolbar from './component';
const WhiteboardToolbarContainer = props => (
<WhiteboardToolbar {...props} />
);
2017-04-20 02:27:00 +08:00
2018-04-10 07:18:49 +08:00
export default withTracker((params) => {
const { whiteboardId } = params;
2018-04-10 07:18:49 +08:00
const data = {
actions: {
undoAnnotation: WhiteboardToolbarService.undoAnnotation,
clearWhiteboard: WhiteboardToolbarService.clearWhiteboard,
addWhiteboardGlobalAccess: WhiteboardService.addGlobalAccess,
removeWhiteboardGlobalAccess: WhiteboardService.removeGlobalAccess,
changeWhiteboardMode: WhiteboardToolbarService.changeWhiteboardMode,
getCurrentPalmRejectionMode: WhiteboardToolbarService.getCurrentPalmRejectionMode,
setInitialPalmRejectionMode: WhiteboardToolbarService.setInitialPalmRejectionMode,
setPalmRejectionMode: WhiteboardToolbarService.setPalmRejectionMode,
2018-04-10 07:18:49 +08:00
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),
2018-04-10 07:18:49 +08:00
isPresenter: WhiteboardToolbarService.isPresenter(),
annotations: WhiteboardToolbarService.filterAnnotationList(),
2019-06-27 00:29:34 +08:00
isMeteorConnected: Meteor.status().connected,
multiUserSize: WhiteboardService.getMultiUserSize(whiteboardId),
2018-04-10 07:18:49 +08:00
};
return data;
})(WhiteboardToolbarContainer);