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

Is possible use two shapes in a node?

$
0
0

@agv wrote:

I using version 1.8.32 and google chrome as a browser.

I have this estructure as nodetemplate:

-node
   -shape(white)
   -shape(black)

Because i want to show the node in this way:
finaltrack

The same shape with different colors and strokewidth to simulate a hollow segment

But this is the result:

track

The black segment doesn t exist.

I tried with another white shape (ones with a close figure, not only segments) and this is the result:

bridge

        // this is the figure generator for both segments (black and white)

    if (shape !== null) {
        var param1 = shape.parameter1;
        if (!isNaN(param1) && param1 >= 0) p1 = param1; // can't be negative or NaN
    }
    var geo = new go.Geometry();
     var startX = 0;
    var startY = 0;
    var endX = w;
    var endY = 0;
    geo.add(new go.PathFigure(startX, startY)
        .add(new go.PathSegment(go.PathSegment.Line, endX, endY).close()));
 
    return geo;

Why the second one had the black segment and the first doesn t have?

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles