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

Documentation isn't usable #1

Open
NerdyDeedsLLC opened this issue Jul 26, 2021 · 0 comments
Open

Documentation isn't usable #1

NerdyDeedsLLC opened this issue Jul 26, 2021 · 0 comments

Comments

@NerdyDeedsLLC
Copy link

Hey man... I love the idea here, but based on the readme docs you've provided (and lack of any examples) I'm ready to give up.

I've imported the library, but the first block you provide:

wrapSvgText({
    text: "Thank you, Chairman"
    style: { fontSize: "32px", width: "300px", whiteSpace: "pre-line" }
});

...chokes out with a Uncaught SyntaxError: Unexpected identifier

Okay, no problem, easy fix:

wrapSvgText({
    text: "Thank you, Chairman", // ⬅︎ Add the missing comma here
    style: { fontSize: "32px", width: "300px", whiteSpace: "pre-line" }
});

Great! Now it compiles!

Except, Uncaught TypeError: wrapSvgText is not a function! Huh. Okay, lets see if it's a constructor. Nope. Maybe a primitive just using getters and setters? Nope. Nor is it extensible.

Um... Okay, let's check the source. No help there, either.

Do you have a working example of this somewhere? I'll be happy to write and open a PR for the documentation alone - I won't mess with your code if that's your preference - if you can show me it functional somewhere. I'm hoping this is just an example of the developer being too close to the code and not realizing all the things their docs have left out that they take for granted. I have more than a little tech writing background however, and I'm totally willing to help with the work (I'm not just opening an issue to make demands, in short).

This is a desperately-needed piece of corner-case functionality that SHOULD have been built in to the SVG spec itself, and you and D3 are the only two I've seen trying to tackle it (and I REALLY don't want to import the 50M lines of D3 for one text bubble, lol)

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