Skip to main content

Place

PlaceAction

PlaceAction represents the action of placing a new Component into the CircuitDesigner.


Constructor

public PlaceAction

new PlaceAction(designer, obj, flip)

Initializes a PlaceAction given the CircuitDesigner, Component, and a flip boolean.

Parameters

  •  designer: CircuitDesigner – The CircuitDesigner this action is done on.

  •  obj: Component – The Component being placed.

  •  flip: false | true – The flip boolean, false for a PlaceAction, true for a DeleteAction.


Properties

No publicly accessible properties on PlaceAction

private designer: CircuitDesigner

Description needed

private obj: Component

Description needed


Methods

public normalExecute

normalExecute() => Action

Executes a PlaceAction by adding the object to the designer.

Returns

  •   Action – 'this' PlaceAction after execution.

public normalUndo

normalUndo() => Action

Undoes a PlaceAction by removing the object from the designer.

Returns

  •   Action – 'this' PlaceAction after undoing.

public getName

getName() => string

Description needed

Returns

  •   stringDescription needed

Static Methods

No static methods for PlaceAction


Functions

Place

Place(designer, obj) => PlaceAction

Description needed

Parameters

Returns

  •   PlaceActionDescription needed

Delete

Delete(designer, obj) => PlaceAction

Description needed

Parameters

Returns

  •   PlaceActionDescription needed

PlaceGroup

PlaceGroup(designer, objs) => GroupAction

Creates a GroupAction for multiple PlaceActions.

Parameters

  •  designer: CircuitDesigner – The CircuitDesigner the actions are being done on.

  •  objs: Component[] – The Components of each action.

Returns

  •   GroupAction – A GroupAction representing the PlaceActions of every Component.