From d10146fbe5f7cdf3bdee3f03113358820bb0b63d Mon Sep 17 00:00:00 2001
From: _pants <_pants@anotherwebsite.org>
Date: Mon, 4 Feb 2013 17:01:26 -0500
Subject: [PATCH] workaround for angular/angular.js#1050
---
app/js/directives.js | 17 ++++++++++++++---
app/partials/vis.html | 8 ++++----
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/app/js/directives.js b/app/js/directives.js
index 4f4e3ff5..422918ac 100644
--- a/app/js/directives.js
+++ b/app/js/directives.js
@@ -1,6 +1,6 @@
'use strict';
-angular.module('app.directives', [])
+var directives = angular.module('app.directives', [])
.directive('updateOnBlur', function() {
return {
restrict: 'EA',
@@ -14,5 +14,16 @@ angular.module('app.directives', [])
});
}
};
- })
-;
+ });
+
+// XXX https://github.com/angular/angular.js/issues/1050#issuecomment-9650293
+angular.forEach(['cx', 'cy', 'd', 'fill', 'r'], function(name) {
+ var ngName = 'ng' + name[0].toUpperCase() + name.slice(1);
+ directives.directive(ngName, function() {
+ return function(scope, element, attrs) {
+ attrs.$observe(ngName, function(value) {
+ attrs.$set(name, value);
+ })
+ };
+ });
+});
diff --git a/app/partials/vis.html b/app/partials/vis.html
index 17a774ea..f6cc3d8e 100644
--- a/app/partials/vis.html
+++ b/app/partials/vis.html
@@ -2,13 +2,13 @@
{{ d.alpha2 | i18n }}: {{ model.countries[d.alpha2].npeers.online.giveGet || 0 }} peers online, {{ model.countries[d.alpha2].npeers.online.give || 0 }} in Give Mode, {{ model.countries[d.alpha2].npeers.online.get || 0 }} in Get Mode
-
+
-
-
+
{{ peer | prettyUser }}
@@ -16,7 +16,7 @@
-
{{ model.profile | prettyUser }}