Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

GoJS v1.8.30 on Ubuntu

$
0
0

@rajesht wrote:

Hi Team

I am using GoJS v1.8.30 in Ubuntu on my local. I am working with Double tree mainly.

I am facing two issues mainly.

  1. I need two different types of nodes, one with circle with an image in the center(Root Node) and Rectangle for all others. I tried that using
    myDiagram.nodeTemplate =
    $(go.Node, “Auto”,
    { isShadowed: false,
    defaultAlignment: go.Spot.LeftCenter },
    // define the node’s outer shape
    $(go.Shape, “Rectangle”,
    { fill: graygrad, stroke: “#D8D8D8”, width: 200, height: 30 },
    new go.Binding(“fill”, “color”)),
    $(go.Picture,
    { width: 32, height: 32, margin: 4 },
    new go.Binding(“source”, “icon”)),
    // define the node’s text
    $(go.TextBlock,
    { margin: 7, font: “600 12px ‘Roboto’, sans-serif”, stroke: “#000”, textAlign: ‘left’ },
    new go.Binding(“text”, “key”),
    new go.Binding(“textAlign”, “alignment”))
    );

    myDiagram.nodeTemplateMap.add(“problem”,
    $(go.Node, “Auto”,
    { width: 100 },
    $(go.Shape, “Circle”,
    { fill: “#fff”, stroke: “#fff”, strokeWidth: 3 })),
    $(go.Picture,
    { width: 32, height: 32, margin: 4, source: “…/images/dashboard-companies-icon.png” },
    new go.Binding(“source”, “icon”))
    );

But the image is not showing.
If that doesn’t work I need to center the text for only that root node at center. textAlign didn’t work for me either.

  1. I am using link routing as Orthogonal, but when the nodes of any of the side increases there is a link starting from the center to the nodes. I don’t want the links starting from center. Instead left and right from the root node is fine. i could not get a code to avoid this. please help.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles