diff --git a/index.html b/index.html
index dafe0df7..29a3c77a 100644
--- a/index.html
+++ b/index.html
@@ -1316,6 +1316,12 @@
| Halo width |
@@ -8104,7 +8110,7 @@
-
+
@@ -8127,8 +8133,13 @@
+<<<<<<< HEAD
+=======
+
+
+>>>>>>> a5a638c4394268b425a8181dfbf29d2778c25933
diff --git a/modules/ui/layers.js b/modules/ui/layers.js
index d3b0e44d..8ba408a7 100644
--- a/modules/ui/layers.js
+++ b/modules/ui/layers.js
@@ -1070,27 +1070,29 @@ function drawStates() {
const bodyData = body.map((p, s) => [p.length > 10 ? p : null, s, states[s].color]).filter(d => d[0]);
const gapData = gap.map((p, s) => [p.length > 10 ? p : null, s, states[s].color]).filter(d => d[0]);
- const haloData = halo.map((p, s) => [p.length > 10 ? p : null, s, states[s].color]).filter(d => d[0]);
const bodyString = bodyData.map(d => ``).join("");
const gapString = gapData.map(d => ``).join("");
- const clipString = bodyData
- .map(d => ``)
- .join("");
- const haloString = haloData
- .map(
- d =>
- ``
- )
- .join("");
-
statesBody.html(bodyString + gapString);
- defs.select("#statePaths").html(clipString);
- statesHalo.html(haloString);
- // connect vertices to chain
+ const isOptimized = shapeRendering.value === "optimizeSpeed";
+ if (!isOptimized) {
+ const haloData = halo.map((p, s) => [p.length > 10 ? p : null, s, states[s].color]).filter(d => d[0]);
+
+ const haloString = haloData
+ .map(d => {
+ const stroke = d3.color(d[2]) ? d3.color(d[2]).darker().hex() : "#666666";
+ return ``;
+ })
+ .join("");
+ statesHalo.html(haloString);
+
+ const clipString = bodyData
+ .map(d => ``)
+ .join("");
+ defs.select("#statePaths").html(clipString);
+ }
+
function connectVertices(start, state) {
const chain = []; // vertices chain to form a path
const getType = c => {
diff --git a/modules/ui/options.js b/modules/ui/options.js
index 62ae30d5..f4d95951 100644
--- a/modules/ui/options.js
+++ b/modules/ui/options.js
@@ -644,17 +644,16 @@ function randomizeCultureSet() {
function setRendering(value) {
viewbox.attr("shape-rendering", value);
- // if (value === "optimizeSpeed") {
- // // block some styles
- // coastline.select("#sea_island").style("filter", "none");
- // statesHalo.style("display", "none");
- // emblems.style("opacity", 1);
- // } else {
- // // remove style block
- // coastline.select("#sea_island").style("filter", null);
- // statesHalo.style("display", null);
- // emblems.style("opacity", null);
- // }
+ if (value === "optimizeSpeed") {
+ // block some styles
+ coastline.select("#sea_island").style("filter", "none");
+ statesHalo.style("display", "none");
+ } else {
+ // remove style block
+ coastline.select("#sea_island").style("filter", null);
+ statesHalo.style("display", null);
+ if (pack.cells && statesHalo.selectAll("*").size() === 0) drawStates();
+ }
}
// generate current year and era name
|