Skip to content

Documentation isn't usable #1

@NerdyDeedsLLC

Description

@NerdyDeedsLLC

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions