Web Dev Solutions

Catalin Mititiuc

From 0368c8e9623f2ff202cc9af45b3239a62c845ea8 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Wed, 10 Jul 2024 19:45:42 -0700 Subject: Clean up scenarios; move some styles into .css files --- public/assets/css/map.css | 8 +- public/assets/css/style.css | 4 - public/assets/images/map4.svg | 102 ----------------------- public/assets/images/scenario-dragon_hunting.svg | 1 - public/assets/images/scenario-side_show.svg | 3 - public/assets/images/scenario_template.svg | 26 +----- src/radial.js | 22 +---- 7 files changed, 11 insertions(+), 155 deletions(-) delete mode 100644 public/assets/images/map4.svg diff --git a/public/assets/css/map.css b/public/assets/css/map.css index bb6b0a8..71fc75c 100644 --- a/public/assets/css/map.css +++ b/public/assets/css/map.css @@ -44,7 +44,8 @@ polyline.move-trace { } #background { - /* fill: #bacae3; */ + stroke: #304b75; + fill: #bacae3; } g.troop-counter, g.counter, g.troop-counter use { @@ -199,6 +200,11 @@ g.selected use.primary-weapon { r: 6px; } +pattern use { + stroke: black; + stroke-width: 0.3px; +} + @keyframes selected { 50% { stroke-width: 0px; diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 33adcf0..0e9f559 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -56,10 +56,6 @@ g#grid { transform: translate(19px, 31px) scale(4); } -#background { - fill: #bacae3; -} - #panel { display: none; position: absolute; diff --git a/public/assets/images/map4.svg b/public/assets/images/map4.svg deleted file mode 100644 index 53a2b71..0000000 --- a/public/assets/images/map4.svg +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/assets/images/scenario-dragon_hunting.svg b/public/assets/images/scenario-dragon_hunting.svg index 5acf1da..8a2186e 100644 --- a/public/assets/images/scenario-dragon_hunting.svg +++ b/public/assets/images/scenario-dragon_hunting.svg @@ -1,6 +1,5 @@ - diff --git a/public/assets/images/scenario-side_show.svg b/public/assets/images/scenario-side_show.svg index 49ef23a..c5a9c78 100644 --- a/public/assets/images/scenario-side_show.svg +++ b/public/assets/images/scenario-side_show.svg @@ -1,8 +1,5 @@ - - - diff --git a/public/assets/images/scenario_template.svg b/public/assets/images/scenario_template.svg index a5f1c83..48c6dfc 100644 --- a/public/assets/images/scenario_template.svg +++ b/public/assets/images/scenario_template.svg @@ -1,27 +1,7 @@ - + - @@ -29,8 +9,8 @@ - - + + diff --git a/src/radial.js b/src/radial.js index 501a0a4..f2ed5fb 100644 --- a/src/radial.js +++ b/src/radial.js @@ -1,5 +1,5 @@ const xmlns = 'http://www.w3.org/2000/svg'; -const svg = document.querySelector('svg'); +const grid = document.querySelector('svg .grid'); const hex = { inradius: 8.66, @@ -219,9 +219,6 @@ const mapsheetHexCoords = generateRadialCoords( 'left' ); -const gameboard = svg.querySelector('.gameboard'); -const grid = svg.querySelector('.grid'); - const mapsheet1 = { id: 'mapsheet1', grid: new Map(mapsheetHexCoords), @@ -643,23 +640,6 @@ findScalar(findMult(sheets)).forEach(([vscalar, row]) => { }) }); - -const circle = document.createElementNS(xmlns, 'circle'); -circle.setAttributeNS(null, 'r', 5); -circle.setAttributeNS(null, 'fill', 'green'); -circle.setAttributeNS(null, 'stroke', 'gold'); -circle.setAttributeNS(null, 'stroke-width', 1); - -const circle1 = circle.cloneNode(); -circle1.setAttributeNS(null, 'fill', 'blue'); - -const circle2 = circle.cloneNode(); -circle2.setAttributeNS(null, 'fill', 'red'); - -// mapsheet2.get('0,0,0,0').appendChild(circle); -// mapsheet2.get('0,6,-6,1').appendChild(circle1); -// mapsheet2.get('0,9,-9,0').appendChild(circle2); - function addGroup(container, className) { const g = document.createElementNS(xmlns, 'g'); g.classList.add(className); -- cgit v1.2.3