isHighlighted property

bool isHighlighted

Gets or sets whether this Part is highlighted. The initial value is false.

Highlighted parts may be shown with a different appearance by changing the brush or visibility of one or more of the GraphObjects within the part. One way of doing that is by using binding. Consider part of the definition of a Node template:

new go.Shape({
    // ... shape properties
  })
  // Shape.fill is bound to Node.data.color
  .bind("fill", "color")
  // Shape.stroke is red when Node.isHighlighted is true, black otherwise
  .bind(new go.Binding("stroke", "isHighlighted",
                       h => h ? "red" : "black").ofObject())

Implementation

_i2.bool get isHighlighted => _i4.getProperty(
      this,
      'isHighlighted',
    );
void isHighlighted=(bool value)

Implementation

set isHighlighted(_i2.bool value) {
  _i4.setProperty(
    this,
    'isHighlighted',
    value,
  );
}