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

How to fix overflow at link end?

$
0
0

@ahmetgundogdu wrote:

There is an overflow at the end of the link.

There is an overflow at the end as shown in the picture

My Link Template:

    go.Shape.defineArrowheadGeometry("MyArrow", go.Geometry.parse("M 3.132812 9.402344 C 3.070312 9.464844 2.992188 9.496094 2.90625 9.496094 C 2.820312 9.496094 2.746094 9.464844 2.683594 9.402344 C 2.558594 9.277344 2.558594 9.078125 2.683594 8.953125 L 6.636719 5 L 2.683594 1.046875 C 2.558594 0.921875 2.558594 0.722656 2.683594 0.597656 C 2.804688 0.472656 3.007812 0.472656 3.132812 0.597656 L 7.308594 4.773438 C 7.433594 4.898438 7.433594 5.101562 7.308594 5.226562 Z M 3.132812 9.402344", true));

    this.diagram.linkTemplate =
                goMake(go.Link, go.Link.Bezier,
                    {
                        fromEndSegmentLength: 50,
                        toEndSegmentLength: 125,
                        adjusting: go.Link.End, //this.getGoEnumValue(this.findConfigDiagram("linkConfig", "adjusting")),
                        zOrder: -1
                    },
                    {
                        selectionAdornmentTemplate:
                            goMake(go.Adornment,
                                goMake(go.Shape,
                                    { isPanelMain: true, stroke: "dodgerblue", strokeWidth: 1 }),
                                goMake(go.Shape,
                                    { toArrow: "MyArrow", fill: "dodgerblue", stroke: null })
                            )
                    },
                    new go.Binding("points").makeTwoWay(),

                    goMake(go.Shape,  // the highlight shape, normally transparent
                        {
                            isPanelMain: true,
                            strokeWidth: 2,
                            stroke: "transparent",
                            name: "HIGHLIGHT",
                        }),
                    goMake(go.Shape, "RoundedRectangle", // the link path shape
                        {
                            isPanelMain: true,
                            strokeWidth: 1
                        },
                        new go.Binding("stroke", "", this.bindLinkBorderColor)
                    ),
                    goMake(go.Shape,  // the arrowhead
                        {
                            toArrow: "MyArrow",
                            strokeWidth: 0
                        },
                        new go.Binding("fill", "", this.bindLinkBorderColor)
                        //new go.Binding("stroke", "", this.bindLinkBorderColor),
                    ),
                    goMake(go.Panel, "Auto",
                        {
                            _isLinkLabel: this.findConfigDiagram("linkConfig", "isDraggableLinkLabel")
                        },
                        goMake(go.Shape, "RoundedRectangle",  // the label background, which becomes transparent around the edges
                            {
                                name: "linkTextBlockBackground",
                            },
                            new go.Binding("fill", "", this.bindLinkTextBackgroundColor).makeTwoWay(),
                            new go.Binding("stroke", "", this.bindLinkTextBackgroundColor).makeTwoWay(),
                            new go.Binding("visible", "", this.bindLinkTextShow).makeTwoWay(),
                        ),


                        goMake(go.TextBlock, "transition",  // the label text
                            {
                                name: "linkTextBlock",
                                textAlign: "center",
                                isMultiline: false,
                                font: "6pt sans-serif",
                                margin: new go.Margin(2, 2, 1.41, 2),
                                editable: true,  // enable in-place editing
                            },
                            new go.Binding("text", "", this.bindLinkText).makeTwoWay(this.converterLinkText)
                        )
                    )
                );

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles