Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Another partial checkin - trying to get callback to work

  • Loading branch information...
commit 230c67bfc6bfd5e0956117deb94e09109fc8c320 1 parent d9a2940
@audreyr audreyr authored
Showing with 7 additions and 5 deletions.
  1. +5 −3 client/gauge.html
  2. +2 −2 client/gauge.js
View
8 client/gauge.html
@@ -10,8 +10,8 @@
<div id="graphs">
{{#each graph_all}}
<div class="graph {{selected}}">
- {{name}} :
- {{#each circle_pos}}
+ {{name}} :
+ {{#each circle_pos}}
-- cx={{cx}} , cy={{cy}}
{{/each}}
</div>
@@ -26,7 +26,9 @@
<input type="button" value="click this">
<div id="vis">
- <svg></svg>
+ <svg>
+ {{render_circles}}
+ </svg>
</div>
</template>
View
4 client/gauge.js
@@ -51,7 +51,7 @@ if (Meteor.is_client) {
'click #vis' : function (event) {
console.log(event);
console.log("You clicked!");
- draw_circle(event.layerX, event.layerY);
+
Circles.insert({
graph_id: Session.get('selected_graph'),
cx: event.layerX,
@@ -61,7 +61,7 @@ if (Meteor.is_client) {
Template.gauge.render_circles = function () {
Meteor.defer(function () {
- var latest_circles = Circles.find({graph_id: graph_id}, {});
+ var latest_circles = Circles.find({graph_id: Session.get('selected_graph')}, {});
for (circle in latest_circles) {
draw_circle(circle.cx, circle.cy);
}
Please sign in to comment.
Something went wrong with that request. Please try again.