import React from "react";
import * as globals from "./globals";

const Hull = ({hull}) => {
  const line = d3.line().curve(d3.curveNatural);
  const pathString = line(hull.hull);

  return (
    <path
      d={pathString}
      fill={globals.groupColor(hull.group[0].gid)}
      fillOpacity={.4}/>
  );
};

export default Hull;

@@ -228,16 +228,18 @@
   fill=%7B
+/*
 globals.
@@ -267,16 +267,37 @@
 %5B0%5D.gid)
+*/ %22rgb(200,200,200)%22
 %7D%0A      
@@ -324,16 +324,373 @@
  );%0A%7D;%0A%0A
+const Hulls = (%7Bhulls, showOnlyGroup%7D) =%3E %7B%0A  return (%0A    %3Cg%3E%0A      %7B%0A        hulls.map((hull) =%3E %7B%0A          let gid = hull.group%5B0%5D.gid;%0A          if (_.isNumber(showOnlyGroup)) %7B%0A            if (gid !== showOnlyGroup) %7B%0A              return %22%22;%0A            %7D%0A          %7D%0A          return %3CHull key=%7Bgid%7D hull=%7Bhull%7D/%3E%0A        %7D)%0A      %7D%0A    %3C/g%3E%0A  )%0A%7D%0A%0A
 export d
@@ -700,10 +700,11 @@
 ult Hull
+s
 ;%0A

move collection view hulls to hulls component