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

Vertical center

$
0
0

@llopht wrote:

goJS is an awesome tools but it's allways complicated to do a node template...

this.go(go.Node, 'Table',
  {
    locationSpot: go.Spot.Center,
    background: '#00FFF0',
    padding: 5,
  },

  this.go(go.Shape, 'RoundedRectangle', {
    spot1: go.Spot.TopLeft,
    spot2: go.Spot.BottomRight,
    rowSpan: 999,
    columnSpan: 999,
    margin: new go.Margin(0, 0),
    stretch: go.GraphObject.Fill,
    strokeWidth: 1,
    stroke: scheme.ui.input.normal.border.color,
    fill: this.go(go.Brush, 'Linear', {
      0:   '#F2F2F2',
      0.1: '#FFFFFF',
      0.9: '#FFFFFF',
      1:   '#EEEEEE',
    }),
  }),

  this.go(go.Panel, 'Vertical',
    {
      column: 0,
      defaultAlignment: go.Spot.Left,
      itemTemplate: this.getPortTemplate(go.Spot.Left, this.properties),
    },
  ),

  this.go(go.Panel, 'Vertical',
    {
      column: 2,
      defaultAlignment: go.Spot.Right,
      itemTemplate: this.getPortTemplate(go.Spot.Right, this.properties),
    },
  ),

  this.go(go.Panel, 'Horizontal',
    {
      column: 1,
      stretch: go.GraphObject.Fill,
      background: '#0000FF',
    },

this.go(go.TextBlock,
{
verticalAlignment: go.Spot.Center,
font: '700 12pt "SourceSansPro", sans-serif',
stroke: this.props.scheme.ui.input.normal.forecolor,
textAlign: 'center',
wrap: go.TextBlock.None,
angle: 270,
margin: new go.Margin(10, 0),
stretch: go.GraphObject.Fill,
minSize: new go.Size(30, 50),
},

  ),

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles