started work on drawing shapes
This commit is contained in:
parent
0c9a17f308
commit
fdd7c57d03
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
}
|
@ -1,8 +1,11 @@
|
||||
<template name="whiteboard">
|
||||
<!-- <input type="button" class="drawShapes" value="slide!" />
|
||||
<input type="button" class="drawShapes2" value="shapes!" /> -->
|
||||
|
||||
{{#if getInSession "display_whiteboard"}}
|
||||
<p>The whiteboard</p>
|
||||
{{/if}}
|
||||
<div id="whiteboard-paper">
|
||||
<div id="whiteboard-paper" style="position: fixed; top: 10%; left: 30%;">
|
||||
<p>
|
||||
{{png}}
|
||||
</p>
|
||||
|
@ -29,9 +29,7 @@ Meteor.methods
|
||||
console.log "----removed slide[" + slideId + "] from " + meetingId
|
||||
|
||||
displayThisSlide: (meetingId, newSlideId, slideObject) ->
|
||||
console.log "\n\n\n the newSlideId=" + newSlideId
|
||||
presentationId = newSlideId.split("/")[0] # grab the presentationId part of the slideId
|
||||
console.log "presentationId=" + presentationId
|
||||
# change current to false for the old slide
|
||||
Meteor.Slides.update({presentationId: presentationId, "slide.current": true}, {$set: {"slide.current": false}})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user