index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-04-04 15:52:56 -0700 |
---|---|---|
committer | Catalin Mititiuc <Catalin.Mititiuc@gmail.com> | 2024-04-04 15:52:56 -0700 |
commit | 8bd67fbee2575bbcc83a4cf7f03f2c4aa5828b92 (patch) | |
tree | f927940fdd4f6229d275e028101d2a784d098488 | |
parent | b75a92bfe30450e4c52fe84a63edc23d0b628c53 (diff) |
Fix using duplicate ids for counters and clip paths
-rw-r--r-- | index.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -583,7 +583,7 @@ const RecordSheet = new function() { unclipped.forEach(el => { let { troopNumber, troopAllegiance } = el.dataset; - el.setAttributeNS(null, 'clip-path', `url(#${troopAllegiance}-${troopNumber})`); + el.setAttributeNS(null, 'clip-path', `url(#clip-path-${troopAllegiance}-${troopNumber})`); }); }; @@ -825,7 +825,7 @@ document.querySelectorAll('.set-firing-arc').forEach(el => el.addEventListener(' clipShape.setAttributeNS(null, 'r', 100); let clipPath = document.createElementNS(svgns, 'clipPath'); - clipPath.setAttributeNS(null, 'id', `${troopAllegiance}-${troopNumber}`); + clipPath.setAttributeNS(null, 'id', `clip-path-${troopAllegiance}-${troopNumber}`); clipPath.dataset.troopNumber = troopNumber; clipPath.dataset.troopAllegiance = troopAllegiance; clipPath.appendChild(clipShape); |