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';
|
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;
|
|
|
|
const data = {
|
|
|
|
actions: {
|
|
|
|
undoAnnotation: WhiteboardToolbarService.undoAnnotation,
|
|
|
|
clearWhiteboard: WhiteboardToolbarService.clearWhiteboard,
|
|
|
|
changeWhiteboardMode: WhiteboardToolbarService.changeWhiteboardMode,
|
|
|
|
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: WhiteboardToolbarService.getMultiUserStatus(whiteboardId),
|
|
|
|
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,
|
2018-04-10 07:18:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
return data;
|
|
|
|
})(WhiteboardToolbarContainer);
|