attach method

GraphObject attach([
  1. dynamic config
])

This method sets a collection of properties according to the property/value pairs on the given Object, or array of Objects, in the same manner as GraphObject.make does when constructing a GraphObject.

This method is used in initialization, but typically you should use #set instead, unless you need to attach new properties that do not exist on the GraphObject, or to set sub-properties. Calling this method is much less efficient than setting properties directly, and does not do compile-time type checking.

new go.Shape()
 .bind("fill", "color")
 .bind("strokeWidth", "width")
 .attach({ // use .attach for untyped property attachments
   "_color": "Red"
 })

@since 2.2 @param {any} config a JavaScript object containing properties to attach, or an array of such objects. @return {GraphObject} this GraphObject @see #setProperties a synonym of this method @see #set a type-safe method to set a collection of properties

Implementation

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