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

Linker Issue: Issue connecting linker from the 'Diamond' shape

$
0
0

@premthomas95 wrote:

Image1
In this image u can see that the linker is connected from the right side of the diamond…But I tried Connceting the link from the bottom of the diamond;;

If the Subprocess is directly below the gateway(Diamond) then I am able to connect it from the bottom of the Diamond
Pasting the code here:

    //create gateway node template
    return go.GraphObject.make(go.Node, 'Table',
      {
        locationObjectName: 'SHAPE',
        locationSpot: go.Spot.TopLeft,
        toolTip: this.tooltiptemplate,
        selectionAdorned: false,
        resizable: true,
       // fromSpot: go.Spot.None, toSpot: go.Spot.None,
        portSpreading: go.Node.SpreadingNone, //Gets or sets how link points are computed when the port spot is a "side" spot. The default value is Node.SpreadingEvenly.

      },
      new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
      // move a selected part into the Foreground layer, so it isn't obscured by any non-selected parts
      new go.Binding('layerName', 'isSelected', (s: boolean) => s ? 'Foreground' : '').ofObject(),
      // can be resided according to the user's desires
      { resizable: true, resizeObjectName: 'SHAPE' },
      go.GraphObject.make(go.Panel, 'Auto',
        go.GraphObject.make(go.Shape, 'Diamond',
          {
            strokeWidth: 1,
            // fill: this.GatewayNodeFill,
            // stroke: this.GatewayNodeStroke,
            name: 'SHAPE',
            desiredSize: new go.Size(this.GatewayNodeSize, this.GatewayNodeSize),
            portId: '', fromLinkable: true, toLinkable: true, cursor: 'pointer',
          //  fromSpot: go.Spot.None, toSpot: go.Spot.None
          },

          new go.Binding('desiredSize', 'size').makeTwoWay(),
          new go.Binding('fill', 'fill').makeTwoWay(),
          new go.Binding('stroke', 'stroke').makeTwoWay(),
        ),  // end main shape
        go.GraphObject.make(go.Shape, 'NotAllowed',
          { alignment: go.Spot.Center, stroke: this.GatewayNodeSymbolStroke, fill: this.GatewayNodeSymbolFill },
          new go.Binding('figure', 'gatewayType', this.nodeGatewaySymbolTypeConverter),
          // new go.Binding("visible", "gatewayType", function(s) { return s !== 4; }),   // comment out if you want exclusive gateway to be X instead of blank.
          new go.Binding('strokeWidth', 'gatewayType', (s: number) => {
            const type = 4;
            return (s <= type) ? this.GatewayNodeSymbolStrokeWidth : 1;
          }
          ),
          new go.Binding('desiredSize', 'gatewayType', this.nodeGatewaySymbolSizeConverter)),
        // the next 2 circles only show up for event gateway
        go.GraphObject.make(go.Shape, 'Circle',  // Outer circle
          {
            strokeWidth: 1, stroke: this.GatewayNodeSymbolStroke, fill: null, desiredSize: new go.Size(this.EventNodeSize, this.EventNodeSize)
          },
          new go.Binding('visible', 'gatewayType', (s: number) => {
            const checkval = 5;
            return s >= checkval;
          }) // only visible for > 5
        ),  // end main shape
        go.GraphObject.make(go.Shape, 'Circle',  // Inner circle
          {
            alignment: go.Spot.Center, stroke: this.GatewayNodeSymbolStroke,
            desiredSize: new go.Size(this.EventNodeInnerSize, this.EventNodeInnerSize),
            fill: null
          },
          new go.Binding('visible', 'gatewayType', (s: number) => {
            const checkval = 5;
            return s === checkval;
          }) // inner  only visible for == 5
        ),

      ),

      go.GraphObject.make(go.TextBlock,
        { row: 1, column: 0, textAlign: 'center', margin: 0, /*margin: new go.Margin(0, 0, 0, 0),*/ editable: true, },
        new go.Binding('text').makeTwoWay(),
        new go.Binding('font', 'font'),
        new go.Binding('stroke', 'textColor')),

      this.makePort('T', go.Spot.Top, go.Spot.Top, true, false),
      this.makePort('L', go.Spot.Left, go.Spot.Left, false, true),
      this.makePort('R', go.Spot.Right, go.Spot.Right, true, true),
      this.makePort('B', go.Spot.Bottom, go.Spot.Bottom, true, false),
    );
  }```

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles