2018-05-12 00:01:24 +08:00
|
|
|
import Annotations from '/imports/ui/components/whiteboard/service';
|
2017-07-27 20:35:55 +08:00
|
|
|
|
2017-08-26 06:45:06 +08:00
|
|
|
const getCurrentAnnotationsInfo = (whiteboardId) => {
|
2017-07-27 20:35:55 +08:00
|
|
|
if (!whiteboardId) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2017-08-26 06:45:06 +08:00
|
|
|
return Annotations.find(
|
|
|
|
{
|
|
|
|
whiteboardId,
|
2018-05-12 00:01:24 +08:00
|
|
|
// annotationType: { $ne: 'pencil_base' },
|
2017-08-26 06:45:06 +08:00
|
|
|
},
|
|
|
|
{
|
2017-10-10 09:30:29 +08:00
|
|
|
sort: { position: 1 },
|
2017-08-26 06:45:06 +08:00
|
|
|
fields: { status: 1, _id: 1, annotationType: 1 },
|
|
|
|
},
|
|
|
|
).fetch();
|
2017-07-27 20:35:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
2017-08-26 06:45:06 +08:00
|
|
|
getCurrentAnnotationsInfo,
|
2017-07-27 20:35:55 +08:00
|
|
|
};
|