setSize method

void setSize(
  1. Size newSize
)

The function setSize sets a new size and calculates port positions accordingly.

Args: newSize (Size): The newSize parameter is of type Size, which likely represents the dimensions or size of an object or element. It is used to update the size of an object to the new dimensions provided.

Implementation

void setSize(Size newSize) {
  size = newSize;
  _calculatePortPositions();
}