diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index da68ad20..8e65c157 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -316,18 +316,8 @@ function editBurg(id) { const p2 = cells.p[cells.haven[i]]; let deg = Math.atan2(p2[1] - p1[1], p2[0] - p1[0]) * 180 / Math.PI - 90; if (deg < 0) deg += 360; - let norm = rn(normalize(deg, 0, 360) * 8) / 4; + let norm = rn(normalize(deg, 0, 360) * 2, 3); if (norm === 2) norm = 0; - switch(norm) { - case 0 : return "&southSea=1"; - case 0.25 : return "&southSea=1&westSea=1"; - case 0.50 : return "&westSea=1"; - case 0.75 : return "&westSea=1&northSea=1"; - case 1 : return "&northSea=1"; - case 1.25 : return "&northSea=1&eastSea=1"; - case 1.5 : return "&eastSea=1"; - case 1.75 : return "&eastSea=1&southSea=1"; - } return "&sea="+norm; // debug.selectAll("*").remove(); // pack.burgs.filter(b => b.port).forEach(b => {