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

Issue 698 Read Path as Data String #699

Merged
merged 2 commits into from
Apr 18, 2023
Merged

Issue 698 Read Path as Data String #699

merged 2 commits into from
Apr 18, 2023

Conversation

jonobr1
Copy link
Owner

@jonobr1 jonobr1 commented Apr 18, 2023

This patch fixes the following scenario:

const two = new Two({
  type: Two.Types.svg,
  fullscreen: true,
  autostart: true
}).appendTo(document.body);

const d = 'M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z';

const path = Two.Utils.read.path.call(two, d);
two.add(path);

By adding null checks on Two.Utils.applySvgAttributes method

@jonobr1 jonobr1 merged commit f06d42f into dev Apr 18, 2023
@jonobr1 jonobr1 deleted the issue-698-read-path branch April 18, 2023 05:18
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

Successfully merging this pull request may close these issues.

1 participant