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

26 lines
831 B
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import TextShapeService from './service';
import TextDrawComponent from './component';
const TextDrawContainer = props => (
<TextDrawComponent {...props} />
);
export default withTracker((params) => {
2018-04-10 07:18:49 +08:00
const { whiteboardId } = params;
const isPresenter = TextShapeService.isPresenter();
2018-04-10 07:18:49 +08:00
const isMultiUser = TextShapeService.getMultiUserStatus(whiteboardId);
const activeTextShapeId = TextShapeService.activeTextShapeId();
let isActive = false;
2017-08-24 12:27:41 +08:00
if ((isPresenter || isMultiUser) && activeTextShapeId === params.annotation.id) {
isActive = true;
}
return {
isActive,
setTextShapeValue: TextShapeService.setTextShapeValue,
resetTextShapeActiveId: TextShapeService.resetTextShapeActiveId,
};
})(TextDrawContainer);