Skip to content

Commit

Permalink
use dot notation
Browse files Browse the repository at this point in the history
  • Loading branch information
dnanto committed May 23, 2022
1 parent cac6b6e commit f424434
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/democapsid.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,15 @@ class Hex {
if (x.segments.length >= 1) {
const c = centroidSegments(f.segments);
x.name = f.name;
x.type = v.some((g) => c.getDistance(g) < this.RU) ? "pen" : "hex";
x.data["type"] = x.type;
x.style = opt[x.type + "." + x.name.split(" ")[0]];
x.data.type = v.some((g) => c.getDistance(g) < this.RU) ? "pen" : "hex";
x.style = opt[x.data.type + "." + x.name.split(" ")[0]];
result.push(x);
var y = new Path.Circle(c, MIN_POINT_RADIUS);
if (T.contains(y)) {
var o = T.intersect(y);
o.name = "ctr-1";
o.data["type"] = x.type;
o.data["name"] = x.name.split(" ")[0];
o.data.type = x.data.type;
o.data.name = x.name.split(" ")[0];
result.push(o);
o.remove();
}
Expand Down

0 comments on commit f424434

Please sign in to comment.