2017-08-19 10:47:31 +08:00
|
|
|
import React from 'react';
|
2017-06-04 10:40:14 +08:00
|
|
|
import PropTypes from 'prop-types';
|
2017-08-26 06:45:06 +08:00
|
|
|
import AnnotationFactory from '../annotation-factory/component';
|
2017-02-23 08:10:30 +08:00
|
|
|
|
2017-09-26 07:45:44 +08:00
|
|
|
const AnnotationGroup = props => (
|
2017-08-26 06:45:06 +08:00
|
|
|
<AnnotationFactory
|
|
|
|
annotationsInfo={props.annotationsInfo}
|
|
|
|
slideWidth={props.slideWidth}
|
|
|
|
slideHeight={props.slideHeight}
|
2018-04-10 07:18:49 +08:00
|
|
|
whiteboardId={props.whiteboardId}
|
2017-08-26 06:45:06 +08:00
|
|
|
/>
|
|
|
|
);
|
2017-02-23 08:10:30 +08:00
|
|
|
|
2017-08-19 10:47:31 +08:00
|
|
|
AnnotationGroup.propTypes = {
|
2018-04-10 07:18:49 +08:00
|
|
|
whiteboardId: PropTypes.string.isRequired,
|
2017-08-19 10:47:31 +08:00
|
|
|
// initial width and height of the slide are required
|
|
|
|
// to calculate the coordinates for each annotation
|
2017-08-26 06:45:06 +08:00
|
|
|
slideWidth: PropTypes.number.isRequired,
|
|
|
|
slideHeight: PropTypes.number.isRequired,
|
2017-08-19 10:47:31 +08:00
|
|
|
|
|
|
|
// array of annotations, optional
|
2017-08-26 06:45:06 +08:00
|
|
|
annotationsInfo: PropTypes.arrayOf(PropTypes.shape({
|
|
|
|
status: PropTypes.string.isRequired,
|
|
|
|
_id: PropTypes.string.isRequired,
|
|
|
|
annotationType: PropTypes.string.isRequired,
|
|
|
|
})).isRequired,
|
2017-08-19 10:47:31 +08:00
|
|
|
};
|
2017-08-17 10:24:59 +08:00
|
|
|
|
2017-08-26 06:45:06 +08:00
|
|
|
export default AnnotationGroup;
|