Skip to content

Can I make the Textbox collapsible to fill it with more description? #130

@altmandian

Description

@altmandian

I want the Nodeboxes to fill more words for the description, including a link to folow maybe. How can I make the boxes fit the content?

I know, that the function to fill the Textbox is:

// D3Plus Textbox with resizing capability
        var d3PlusBodyTextBox = new d3PlusTextBox()
            .select(element) // Sets the D3Plus code to append to the specified DOM element.
            .data(singledOutData)
            .text((data, index, arr) => {
                return self.getBodyDisplayText.call(self, data);
            })
            .textAnchor("middle")
            .verticalAlign("middle")
            .fontSize(13) // in pixels
            .x(nodeBodyBoxPadding.left)
            .y(recalculatedPaddingTop - nodeBodyBoxHeight / 2)
            .width(nodeBodyBoxWidth - nodeBodyBoxPadding.left - nodeBodyBoxPadding.right)
            .height(nodeBodyBoxHeight - recalculatedPaddingTop - nodeBodyBoxPadding.bottom)
            .ellipsis((text, line) => {
                // If text was cut-off, add tooltip
                selection.append("title")
                    .text(self.getBodyDisplayText(data));
                return ((text.replace(/\.|,$/g, "")) + "...");
            })
            .render();
    });

I am not sure, how to change it, so it will would fit my content inside the, or the box is spread out by the lenght of my conten. It would be great to know how to do that.

Thank you :)

te

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions