diff --git a/labs/meteor-client/client/views/whiteboard/whiteboard.coffee b/labs/meteor-client/client/views/whiteboard/whiteboard.coffee index b72b1b968a..a33dbb8d5a 100644 --- a/labs/meteor-client/client/views/whiteboard/whiteboard.coffee +++ b/labs/meteor-client/client/views/whiteboard/whiteboard.coffee @@ -8,13 +8,57 @@ Template.whiteboard.png = -> wpm = new WhiteboardPaperModel('whiteboard-paper') wpm.create() wpm._displayPage(currentSlide?.slide?.png_uri) - for shape in Meteor.Shapes.find().fetch() - shapeType = shape.shape.payload.shape.shape_type - data = shape.shape.payload.shape.shape + + for shape in Meteor.Shapes.find({whiteboardId: currentSlide?.slide?.id}).fetch() + console.log "for this shape\n#{JSON.stringify(shape)}\n" + shapeType = shape.shape?.shape?.type + data = shape.shape?.shape # TODO change some of these!! console.log "shapeType=" + shapeType console.log "data=" + JSON.stringify data + + #the points should be within [0,1] + for point in data.points + point = point / 100 + #alert point - wpm.makeShape(shapeType, data) - wpm.updateShape(shapeType, data) - currentSlide?.slide?.png_uri + #wpm.makeShape(shapeType, data) + #wpm.updateShape(shapeType, data) + #currentSlide?.slide?.png_uri + +# Template.whiteboard.events +# "click .drawShapes": -> +# currentPresentation = Meteor.Presentations.findOne({"presentation.current": true}) +# presentationId = currentPresentation?.presentation?.id +# currentSlide = Meteor.Slides.findOne({"presentationId": presentationId, "slide.current": true}) +# console.log "the current slide is:" + currentSlide?.slide?.id + +# if currentSlide?.slide?.png_uri? +# #alert "drawShapes" +# wpm = new WhiteboardPaperModel('whiteboard-paper') +# setInSession "wpm", wpm +# wpm.create() +# wpm._displayPage(currentSlide?.slide?.png_uri) + +# "click .drawShapes2": -> +# alert "hoho" +# currentPresentation = Meteor.Presentations.findOne({"presentation.current": true}) +# presentationId = currentPresentation?.presentation?.id +# currentSlide = Meteor.Slides.findOne({"presentationId": presentationId, "slide.current": true}) +# console.log "the current slide is:" + currentSlide?.slide?.id +# for shape in Meteor.Shapes.find({whiteboardId: currentSlide?.slide?.id}).fetch() +# console.log "for this shape\n#{JSON.stringify(shape)}\n" +# shapeType = shape.shape?.shape?.type +# data = shape.shape?.shape # TODO change some of these!! +# console.log "shapeType=" + shapeType +# console.log "data=" + JSON.stringify data + +# #the points should be within [0,1] +# for point in data.points +# point = point / 100 +# #alert point + +# wpm = getInSession("wpm") + +# wpm.makeShape(shapeType, data) +# wpm.updateShape(shapeType, data) diff --git a/labs/meteor-client/client/views/whiteboard/whiteboard.css b/labs/meteor-client/client/views/whiteboard/whiteboard.css deleted file mode 100644 index a36a526cdd..0000000000 --- a/labs/meteor-client/client/views/whiteboard/whiteboard.css +++ /dev/null @@ -1,56 +0,0 @@ -body { - margin: 0; - overflow: hidden; - background-color: white; -} - -#header { - position: fixed; - top: 0px; - left: 0px; - color: rgb(220, 220, 220); - border-bottom: 1px solid rgb(100, 100, 100); - padding: 15px 5px 5px 10px; - width: 100%; -} - -#header #heading { - float: left; - width: 300px; -} - -#header #heading { - float: left; - width: 300px; -} - -#header #heading h1 { - font-size: 28px; - line-height: 25px; - margin: 0px 0px 8px 0px; - float: left; -} - -#header #heading h2 { - margin-bottom: 10px; - font-size: 16px; - line-height: 16px; - font-weight: normal; -} - -#header #heading h2 a { - color: inherit; - text-decoration: none; - font-weight: bold; - border-bottom: 1px dashed white; -} - -#messages { - background: #f6f6f6; - position: fixed; - top: 60px; - right: 0px; - width: 200px; - padding: 10px; - text-align: center; -} diff --git a/labs/meteor-client/client/views/whiteboard/whiteboard.html b/labs/meteor-client/client/views/whiteboard/whiteboard.html index 29aa60d62f..1b3864cb4f 100755 --- a/labs/meteor-client/client/views/whiteboard/whiteboard.html +++ b/labs/meteor-client/client/views/whiteboard/whiteboard.html @@ -1,8 +1,11 @@