|
|
@@ -2,7 +2,7 @@
|
|
|
* Renders bullseyes as geo-json poly gon entities
|
|
|
* Allows for them to clip on spheres correctly
|
|
|
*/
|
|
|
-function displayBullseye(scope, dr, path) {
|
|
|
+function displayBullseye(scope, dr) {
|
|
|
|
|
|
var degrees = 180 / Math.PI
|
|
|
var circle = d3.geo.circle();
|
|
|
@@ -10,7 +10,7 @@ function displayBullseye(scope, dr, path) {
|
|
|
|
|
|
if (scope.panel.display.bullseye.enabled) {
|
|
|
data = [
|
|
|
- {lat: parseFloat(scope.panel.display.bullseye.coord.lat), lon: parseFloat(scope.panel.display.bullseye.coord.lon)}
|
|
|
+ circle.origin(parseFloat(scope.panel.display.bullseye.coord.lat), parseFloat(scope.panel.display.bullseye.coord.lon)).angle(1000 / 6371 * degrees)()
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -18,10 +18,8 @@ function displayBullseye(scope, dr, path) {
|
|
|
.data(data);
|
|
|
|
|
|
arcs.enter().append("path")
|
|
|
- .datum(function(d) {
|
|
|
- return circle.origin([d.lon, d.lat]).angle(1000 / 6371 * degrees)();
|
|
|
- })
|
|
|
- .attr("d", path)
|
|
|
+
|
|
|
+ .attr("d", dr.path)
|
|
|
.attr("class", "arc");
|
|
|
|
|
|
arcs.exit().remove();
|