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

toPath method not working for Rectangle. Passed attribut invalid #14

Open
Shadoworker opened this issue Jun 12, 2021 · 1 comment
Open

Comments

@Shadoworker
Copy link

curve.js:40793 Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '0' is not a valid attribute name.

@Shadoworker
Copy link
Author

Solution 1

Replace in toPath() method

  // let {
  //   width: w,
  //   height: h,
  //   rx,
  //   ry,
  //   x,
  //   y
  // } = this.attr(['width', 'height', 'rx', 'ry', 'x', 'y'])

  let w = this.attr("width");
  let h = this.attr("height");
  let rx = this.attr("rx");
  let ry = this.attr("ry");
  let x = this.attr("x");
  let y = this.attr("y");

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