ReplaceComponent
ReplaceComponent
ReplaceComponent(designer, comp, replacement, selections) => GroupAction<GroupAction, DigitalComponent>
Returns a GroupAction for replacing the original component with a new one. Replacement must be able to have at least as many input/output ports as original has in use. Original must be placed in a designer.
Parameters
designer: DigitalCircuitDesigner
– The circuit designer for the component.comp: DigitalComponent
– The component to replace.replacement: { id: string; amt?: number; }
– The new component's replacement info.selections: SelectionsWrapper
– If supplied, deselects the current selection and selects replacement.
Returns
-
GroupAction<GroupAction, DigitalComponent>
– A GroupAction containing the actions required to replace the component and the new component.