2017-04-20 02:27:00 +08:00
|
|
|
import React from 'react';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2021-03-05 06:26:25 +08:00
|
|
|
import WhiteboardService from '/imports/ui/components/whiteboard/service';
|
2017-04-20 02:27:00 +08:00
|
|
|
import WhiteboardToolbarService from './service';
|
|
|
|
import WhiteboardToolbar from './component';
|
|
|
|
|
2017-09-26 07:45:44 +08:00
|
|
|
const WhiteboardToolbarContainer = props => (
|
2017-08-03 09:24:38 +08:00
|
|
|
<WhiteboardToolbar {...props} />
|
2018-01-08 12:44:42 +08:00
|
|
|
);
|
2017-04-20 02:27:00 +08:00
|
|
|
|
2018-04-10 07:18:49 +08:00
|
|
|
export default withTracker((params) => {
|
|
|
|
const { whiteboardId } = params;
|
2020-08-18 01:03:23 +08:00
|
|
|
|
2018-04-10 07:18:49 +08:00
|
|
|
const data = {
|
|
|
|
actions: {
|
|
|
|
undoAnnotation: WhiteboardToolbarService.undoAnnotation,
|
|
|
|
clearWhiteboard: WhiteboardToolbarService.clearWhiteboard,
|
2021-03-05 06:26:25 +08:00
|
|
|
addWhiteboardGlobalAccess: WhiteboardService.addGlobalAccess,
|
|
|
|
removeWhiteboardGlobalAccess: WhiteboardService.removeGlobalAccess,
|
2020-09-18 18:30:27 +08:00
|
|
|
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(),
|
2021-03-19 01:53:11 +08:00
|
|
|
multiUser: WhiteboardService.isMultiUserActive(whiteboardId),
|
2018-04-10 07:18:49 +08:00
|
|
|
isPresenter: WhiteboardToolbarService.isPresenter(),
|
2018-09-22 00:42:00 +08:00
|
|
|
annotations: WhiteboardToolbarService.filterAnnotationList(),
|
2019-06-27 00:29:34 +08:00
|
|
|
isMeteorConnected: Meteor.status().connected,
|
2021-03-05 06:26:25 +08:00
|
|
|
multiUserSize: WhiteboardService.getMultiUserSize(whiteboardId),
|
2018-04-10 07:18:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
return data;
|
|
|
|
})(WhiteboardToolbarContainer);
|