Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
spawnrider opened this issue Apr 12, 2024 · 1 comment
Open

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

spawnrider opened this issue Apr 12, 2024 · 1 comment

Comments

@spawnrider
Copy link

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
Copy link
Author

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})`}
    />
  );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant