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 }}