dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 588 forks source link

Office Fabric UI icon Spinner does not animate when passed in as a label for a node in the graph #341

Open nreact opened 5 years ago

nreact commented 5 years ago

I am trying to use the Spinner component from officeFabri ui in node.label. The text of the spinner is showing up in nodes but not the animation..

here is snippet of code I am using in my react application. This method returns a label for the graph so that setnode can use this node

private renderNode = (node: GraphNode): dagreD3.Label => { const spinner = <Spinner size={ SpinnerSize.large } label="test" />; const spinnerHTML = ReactDOMServer.renderToString(spinner);

    return {
        labelType: "html",
        label: `
                    ${spinnerHTML}

               `,

    };