bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/annotations/text/container.jsx
Oleksandr Zhurbenko f80d0bc083 Linting and moved whiteboard resize events into HoC
Thus we won't clutter the code with unrelated events and can easily switch to a ResizeObserver when it is implemented by the browsers
2017-09-25 16:45:44 -07:00

25 lines
792 B
JavaScript

import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import TextShapeService from './service';
import TextDrawComponent from './component';
const TextDrawContainer = props => (
<TextDrawComponent {...props} />
);
export default createContainer((params) => {
const isPresenter = TextShapeService.isPresenter();
const isMultiUser = TextShapeService.getMultiUserStatus();
const activeTextShapeId = TextShapeService.activeTextShapeId();
let isActive = false;
if ((isPresenter || isMultiUser) && activeTextShapeId === params.annotation.id) {
isActive = true;
}
return {
isActive,
setTextShapeValue: TextShapeService.setTextShapeValue,
resetTextShapeActiveId: TextShapeService.resetTextShapeActiveId,
};
}, TextDrawContainer);