set method

GraphObject set(
  1. dynamic config
)

Set any number of properties on this GraphObject. This is common in initialization. This method can only be used to set existing properties on this object. To attach new properties, or to set properties of elements, use GraphObject#setProperties.

This method uses TypeScript compile-time type checking, but does no runtime type checking. If you need to set properties without type checking, or attach new properties, use GraphObject#attach.

// Common init for use in many different shapes:
var shapeStyle = (() => { return { background: 'red', strokeWidth: 0 }; })

// Constructor init is equivalent to "set"
// But if you use common init (eg, shapeStyle())
// You may wish to set additional properties via "set"
new go.Shape(shapeStyle())
 .bind("fill", "color")
 .bind("strokeWidth", "width")
 .set({ // more init via set
   figure: "RoundedRectangle"
 })

@since 2.2 @param {Partial

Implementation

_i3.GraphObject set(_i2.dynamic config) => _i4.callMethod(
      this,
      'set',
      [config],
    );