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

Long SVG lines bug in Chrome #169

Open
kungfooman opened this issue Apr 21, 2024 · 0 comments
Open

Long SVG lines bug in Chrome #169

kungfooman opened this issue Apr 21, 2024 · 0 comments

Comments

@kungfooman
Copy link
Sponsor Contributor

Example Bug

svgbug

Applying round lines caps fixes it for some reason:

return `<LINE style="pointer-events:none; stroke-linecap:round;stroke-linejoin:round;" x1=

Example Fix: https://enkimute.github.io/ganja.js/examples/coffeeshop.html#OC4BPrvc2

Algebra(2,0,1,()=>{
  var point = (x,y)=>!(1e0 + x*1e1 + y*1e2);  
  const a = point(0, 0);
  const b = point(-2000000, -1704966);
  const toGraph = [
    '<G style="stroke-linecap:round;stroke-linejoin:round;">',
    [b, a],
    '</g>',
  ];
  const options = {
    grid        : true, // Display a grid
    labels      : false,// Label the grid
    lineWidth   : 3,    // Custom lineWidth (default=1)
    pointRadius : 1,    // Custon point radius (default=1)
    fontSize    : 1,    // Custom font size (default=1)
    scale       : 1,    // Custom scale (default=1), mousewheel.
  };
  const dom = this.graph(toGraph, options);
  document.body.append(dom);
});
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