## module:Connector(appInstance, gridSize, left, top)

parent class for input and output connectors

#### new module:Connector(appInstance, gridSize, left, top)
`modules/editorElements/Connector.js`, `line 13`

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `appInstance` | App | link to the App instance that this connector will belong to
  `gridSize` | number | size of the grid in SVG pixels
  `left` | number | horizontal position defined in grid units (SVG pixels divided by the grid size)
  `top` | number | vertical position defined in grid units (SVG pixels divided by the grid size)

### Extends

- NetworkElement

### Members

#### connectorOffset :number
`modules/editorElements/Connector.js`, `line 37`

  offset of the connector from the grid in SVG pixels

#### connectorSize :number
`modules/editorElements/Connector.js`, `line 32`

  size of the connector in SVG pixels

#### elementState :Logic.state
`modules/editorElements/Connector.js`, `line 64`

  current logical state of this connector

#### gridSize :number
`modules/editorElements/Connector.js`, `line 27`

  size of the grid in SVG pixels

#### isInputConnector :Boolean
`modules/editorElements/Connector.js`, `line 58`

  this flag describes whether this connector is an input connector

#### isOutputConnector
`modules/editorElements/Connector.js`, `line 78`

  whether this connector is an output connector

#### isOutputConnector
`modules/editorElements/Connector.js`, `line 86`

  whether this connector is an output connector

#### state
`modules/editorElements/Connector.js`, `line 129`

  get state of this connector

#### svgObj :svgObj
`modules/editorElements/Connector.js`, `line 43`

  instance of svgObjects.svgObj that holds all SVG information about this connector

#### wireIds :Set
`modules/editorElements/Connector.js`, `line 71`

  set of ids of all wires connected to this connector

### Methods

#### addWireId(wireId)
`modules/editorElements/Connector.js`, `line 94`

  add a wire id to the list of wire ids

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `wireId` | string |

#### get() → {svgObjects.Rectangle}
`modules/editorElements/Connector.js`, `line 137`

  get svgObj instance content of this connector

  ##### Returns:

  svgObjects.Rectangle

#### onMouseUp()
`modules/editorElements/Connector.js`, `line 144`

  call wireCreationHelper on mouse up

#### removeWireId(wireId)
`modules/editorElements/Connector.js`, `line 102`

  remove a wire id from the list of wire ids

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `wireId` | string |

#### removeWireIdAndUpdate(wireId)
`modules/editorElements/Connector.js`, `line 110`

  remove a wire specified by ID and update the connector

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `wireId` | string | ID of the wire to be removed

#### setState(state)
`modules/editorElements/Connector.js`, `line 118`

  set logical state of the connector

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `state` | Logic.state | new state of the connector