diff --git a/examples/landmark-demo/client/landmark-demo.js b/examples/landmark-demo/client/landmark-demo.js
index 54f5c4b058..7c8a4c7edd 100644
--- a/examples/landmark-demo/client/landmark-demo.js
+++ b/examples/landmark-demo/client/landmark-demo.js
@@ -180,8 +180,10 @@ Template.circles.events = {
},
'click .remove': function () {
var selected = Session.get("selectedCircle:" + this.group);
- if (selected)
+ if (selected) {
Circles.remove(selected);
+ Session.set("selectedCircle:" + this.group, null);
+ }
},
'click .scram': function () {
Circles.find({group: this.group}).forEach(function (r) {
@@ -207,6 +209,11 @@ Template.circles.count = function () {
return Circles.find({group: this.group}).count();
};
+Template.circles.disabled = function () {
+ return Session.get("selectedCircle:" + this.group) ?
+ '' : 'disabled="disabled"';
+};
+
Template.circles.render = function (template) {
var self = this;
self.node = template.find("svg");
diff --git a/examples/landmark-demo/landmark-demo.html b/examples/landmark-demo/landmark-demo.html
index f83a8977e3..2673c0f9bf 100644
--- a/examples/landmark-demo/landmark-demo.html
+++ b/examples/landmark-demo/landmark-demo.html
@@ -81,7 +81,7 @@
{{count}} circles
-
+