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 --- src/radial.js | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src') 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