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

Scrolling Table Angular Error

$
0
0

@cr3zi wrote:

Hi there,

I'm currently trying to use the scrolling table panel but I receive this error when I build my angular project.

important sections of code from my class that is imported into the diagram.ts file.

import * as st from 'gojs/extensionsTS/ScrollingTable';
import * as go from 'gojs';

private static $ = go.GraphObject.make;  

static getDiagramTemplate(){
    var template = this.$(go.Node, "Vertical",
    {
      selectionObjectName: "SCROLLER",
      resizable: true, resizeObjectName: "SCROLLER",
      portSpreading: go.Node.SpreadingNone
    },
    new go.Binding("location").makeTwoWay(),
    this.$(go.TextBlock,
      { font: "bold 14px sans-serif" },
      new go.Binding("text", "key")),
    this.$(go.Panel, "Auto",
      this.$(go.Shape, { fill: "white" }),
      this.$("ScrollingTable",
        {
          name: "SCROLLER",
          desiredSize: new go.Size(NaN, 60),  // fixed width
          stretch: go.GraphObject.Fill,       // but stretches vertically
          defaultColumnSeparatorStroke: "gray",
          defaultColumnSeparatorStrokeWidth: 0.5
        },
        new go.Binding("TABLE.itemArray", "items"),
        new go.Binding("TABLE.column", "left", function(left) { return left ? 2 : 0; }),
        {
          "TABLE.itemTemplate":
            this.$(go.Panel, "TableRow",
              {
                defaultStretch: go.GraphObject.Horizontal,
                fromSpot: go.Spot.LeftRightSides, toSpot: go.Spot.LeftRightSides,
                fromLinkable: true, toLinkable: true
              },
              new go.Binding("portId", "name"),
            ),
          "TABLE.defaultColumnSeparatorStroke": "gray",
          "TABLE.defaultColumnSeparatorStrokeWidth": 0.5,
          "TABLE.defaultRowSeparatorStroke": "gray",
          "TABLE.defaultRowSeparatorStrokeWidth": 0.5,
          "TABLE.defaultSeparatorPadding": new go.Margin(1, 3, 0, 3)
        }
      )
    )
  );
    return template;
  }

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles