2017-02-24 08:11:27 +08:00
|
|
|
import React from 'react';
|
2017-08-21 08:16:39 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2017-02-24 08:11:27 +08:00
|
|
|
import PresentationOverlay from './component';
|
2019-07-18 08:30:28 +08:00
|
|
|
import WhiteboardToolbarService from '../../whiteboard/whiteboard-toolbar/service';
|
2017-02-24 08:11:27 +08:00
|
|
|
|
2017-08-21 08:16:39 +08:00
|
|
|
const PresentationOverlayContainer = ({ children, ...rest }) => (
|
|
|
|
<PresentationOverlay {...rest}>
|
|
|
|
{children}
|
|
|
|
</PresentationOverlay>
|
|
|
|
);
|
2017-02-24 08:11:27 +08:00
|
|
|
|
2019-07-18 08:30:28 +08:00
|
|
|
export default withTracker(({ podId, currentSlideNum, slide }) => {
|
|
|
|
const drawSettings = WhiteboardToolbarService.getCurrentDrawSettings();
|
|
|
|
const tool = drawSettings ? drawSettings.whiteboardAnnotationTool : '';
|
|
|
|
|
|
|
|
return {
|
|
|
|
slide,
|
|
|
|
podId,
|
|
|
|
currentSlideNum,
|
|
|
|
annotationTool: tool,
|
|
|
|
};
|
|
|
|
})(PresentationOverlayContainer);
|
2017-08-21 08:16:39 +08:00
|
|
|
|
|
|
|
PresentationOverlayContainer.propTypes = {
|
|
|
|
children: PropTypes.node,
|
|
|
|
};
|
|
|
|
|
|
|
|
PresentationOverlayContainer.defaultProps = {
|
|
|
|
children: undefined,
|
|
|
|
};
|