AOEpeople / aoe_technology_radar

Create your own Technology Radar: A static site generator for a full featured Technology Radar. Features: Quadrants, Rings, Dashboard, Radar Visualization, Item History, Search etc..
http://www.aoe.com/techradar
Other
262 stars 121 forks source link

BlipNew path is not taking in account the blipSize value #455

Open spawnrider opened 5 months ago

spawnrider commented 5 months ago

BlipNew (triangle) is not taking in account the Blipsize value define in the config.json file. See below : capture 2024-04-12 at 15 24 20

spawnrider commented 5 months ago

A workaroung is to scale the path using the scale function like this :

function BlipNew({ x, y, color }: BlipProps) {
  x = Math.round(x - halfBlipSize);
  y = Math.round(y - halfBlipSize);
  const scale = blipSize / 12; 
  return (
    <path
      stroke="none"
      fill={color}
      d="M5.7679491924311 2.1387840678323a2 2 0 0 1 3.4641016151378 0l5.0358983848622 8.7224318643355a2 2 0 0 1 -1.7320508075689 3l-10.071796769724 0a2 2 0 0 1 -1.7320508075689 -3"
      transform={`translate(${x},${y}) scale(${scale})`}
    />
  );
}