bigbluebutton-Github/labs/meteor-client/collections/shapes.coffee

27 lines
934 B
CoffeeScript
Raw Normal View History

2014-07-08 03:08:24 +08:00
Meteor.methods
addShapeToCollection: (meetingId, whiteboardId, shapeObject) ->
entry = {
meetingId: meetingId
whiteboardId: whiteboardId
shape: {
wb_id: shapeObject.wb_id
shape_type: shapeObject.shape_type
status: shapeObject.status
id: shapeObject.id
shape: {
type: shapeObject.shape.type
status: shapeObject.shape.status
points: shapeObject.shape.points
whiteboardId: shapeObject.shape.whiteboardId
id: shapeObject.shape.id
square: shapeObject.shape.square
transparency: shapeObject.shape.transparency
thickness: shapeObject.shape.thickness
color: shapeObject.shape.color
}
}
}
id = Meteor.Shapes.insert(entry)
console.log "added shape id =[#{id}]:#{shapeObject.message}. Shapes.size is now
# #{Meteor.Shapes.find({meetingId: meetingId}).count()}"