Home Reference Source
import PatchView from './ui/components/patchview.js'
public class | source

PatchView

Extends:

Events → PatchView

manage patch view and helper functions

Static Method Summary

Static Public Methods
public static

getElement(): *

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public get

element: *

public

hasOldOps: boolean

public

hasUiErrors: boolean

public

isPasting: boolean

public get
public get
public

store: *

Private Members
private
private
private
private
private

_log: *

private

_p: *

private
private
private

Method Summary

Public Methods
public

addAssetOpAuto(filename: *, event: *)

public

addBlueprintInfo(op: *, outerOp: *): *

public

addOp(opname: *, options: *)

public

addOpAndLink(opname: *, opid: *, portname: *, cb: *)

public
public
public

alignOps(selectedOps: *): *

public

alignSelectedOpsHor(ops: *): *

public
public

centerSelectOp(opid: *)

public

centerSubPatchBounds(subPatch: *)

public

centerView(x: *, y: *)

public
public
public
public

cleanOps(ops: *)

public
public

clickSubPatchNav(subPatchId: *)

public
public
public

clipboardPaste(e: *, oldSub: *, mouseX: *, mouseY: *, next: *)

public
public

copyOpInputPorts(origOp: *, newOp: *)

public
public

createSubPatchFromSelection(version: number, next: undefined, options: {})

public

cursorNavOps(x: *, y: *)

public
public

downGradeOp(opid: *, opname: *)

public

focus()

public

focusOp(opid: *)

public

focusOpAnim(opid: *)

public

focusSubpatchOp(subPatchId: *)

public

focusSubpatchOp(subPatchId: *)

public

getAllOpsInBlueprint(subid: *): *

public

getAllSubPatchOps(subid: *): *

public
public

getBlueprintOpsForSubPatches(subpatchIds: *, localOnly: boolean): *

public
public
public

getDistScore(primAxis: *, secAxis: *, primAxisB: *, secAxisB: *): *

public

getOpBounds(ops: *, options: {}): *

public
public
public
public

getSelectionBounds(minWidth: *): *

public

getSubPatchBounds(subPatchId: *): *

public

getSubPatchExposedPorts(subid: *, dir: *): *

public
public

getSubPatchName(subpatch: *): *

public

getSubPatchOuterOp(subPatchId: *): *

public

getSubPatches(sort: *): *

public

getSubpatchPathArray(subId: *, arr: *): *

public
public

hasFocus(): *

public
public

insertOpInLink(oldLink: *, op: *, x: *, y: *)

public

isCurrentOp(op: *): *

public

isCurrentOpId(opid: *): *

public

linkPortToOp(e: *, opid: *, pid: *, op2id: *)

public

linkPorts(opid: *, pid: *, op2id: *, p2id: *, event: *)

public

linkPortsToOp(e: *, opid: *, opids: *, portnames: *)

public
public

pause()

public
public
public
public

replaceOp(opid: *, newOpObjName: *, cb: undefined)

public

replaceOpCheck(opid: *, newOpObjName: *)

public

replacePortValues(ops: *, portName: *, valueNew: *, valueOld: *)

public

resetOpValues(opid: *, portname: *)

public

resume()

public
public
public

selectAllOpsSubPatch(subPatch: *, noUnselect: *)

public

selectChilds(id: *)

public

selectOpId(id: *)

public

serialize(dataUi: *)

public

serializeOps(selectedOps: *, options: {}): {"ops": *}

public

setCurrentSubPatch(subpatch: *, next: *)

public

setExposedPortOrder(port: *, dir: *)

public

setOpColor(col: *): *

public

setOpPos(op: *, x: *, y: *)

public

setPatchRenderer(id: *, pr: *)

public

setPortTitle(opId: *, portName: *, oldtitle: *)

public
public

setProject(proj: *, cb: *)

public
public

setSize(x: *, y: *, w: *, h: *)

public
public
public
public
public

suggestionBetweenTwoOps(op1: *, op2: *)

public

switch(id: *)

public

testCollision(op: *)

public
public

unlinkPort(opid: *, portid: *)

public

unlinkSelectedOps(firstOnly: *)

public
public
public

updateBlueprints(blueprintOps: *[])

public
public

updateSubPatchBreadCrumb(currentSubPatch: *)

public
public

zoomStep(step: *)

Private Methods
private
private
private

_portValidate(p1: *, p2: *)

Inherited Summary

From class Events
public

off: *

public

on: *

private
private
private

_log: *

private

_logEvents: boolean

private

_logName: string

public

addEventListener(which: *, cb: *, idPrefix: string): string

add event listener

public

emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *)

emit event

public

hasEventListener(id: *, cb: *): boolean

check event listener registration

public

hasListenerForEventName(eventName: *): boolean

check event listener by name

public

logEvents(enabled: boolean, logName: string)

enable/disable logging of events for the class

public

removeEventListener(id: *, cb: *)

rempve event listener registration

Static Public Methods

public static getElement(): * source

Return:

*

Public Constructors

public constructor() source

Override:

Events#constructor

Public Members

public boundingRect: * source

public get element: * source

public hasOldOps: boolean source

public hasUiErrors: boolean source

public isPasting: boolean source

public get patchRenderer: * source

public get rendererName: * source

public store: * source

Private Members

private _checkErrorTimeout: * source

private _eleSubpatchNav: * source

private _element: * source

private _lastTempOP: * source

private _log: * source

Override:

Events#_log

private _p: * source

private _patchRenderer: * source

private _pvRenderers: {} source

private _showingNavHelperEmpty: boolean source

Public Methods

public addAssetOpAuto(filename: *, event: *) source

Params:

NameTypeAttributeDescription
filename *
event *

public addBlueprintInfo(op: *, outerOp: *): * source

Params:

NameTypeAttributeDescription
op *
outerOp *

Return:

*

public addOp(opname: *, options: *) source

Params:

NameTypeAttributeDescription
opname *
options *

Params:

NameTypeAttributeDescription
opname *
opid *
portname *
cb *

public addSpaceBetweenOpsX() source

public addSpaceBetweenOpsY() source

public alignOps(selectedOps: *): * source

Params:

NameTypeAttributeDescription
selectedOps *

Return:

*

public alignSelectedOpsHor(ops: *): * source

Params:

NameTypeAttributeDescription
ops *

Return:

*

public alignSelectedOpsVert(ops: *): * source

Params:

NameTypeAttributeDescription
ops *

Return:

*

public centerSelectOp(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public centerSubPatchBounds(subPatch: *) source

Params:

NameTypeAttributeDescription
subPatch *

public centerView(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

public checkPatchErrors() source

public checkPatchErrorsSoon() source

public checkPatchOutdated() source

public cleanOps(ops: *) source

Params:

NameTypeAttributeDescription
ops *

public clearPatch() source

public clickSubPatchNav(subPatchId: *) source

Params:

NameTypeAttributeDescription
subPatchId *

public clipboardCopyOps(e: *) source

Params:

NameTypeAttributeDescription
e *

public clipboardCutOps(e: *) source

Params:

NameTypeAttributeDescription
e *

public clipboardPaste(e: *, oldSub: *, mouseX: *, mouseY: *, next: *) source

Params:

NameTypeAttributeDescription
e *
oldSub *
mouseX *
mouseY *
next *

public compressSelectedOps(ops: *) source

Params:

NameTypeAttributeDescription
ops *

public copyOpInputPorts(origOp: *, newOp: *) source

Params:

NameTypeAttributeDescription
origOp *
newOp *

public createAreaFromSelection() source

public createSubPatchFromSelection(version: number, next: undefined, options: {}) source

Params:

NameTypeAttributeDescription
version number
  • optional
  • default: 0
next undefined
  • optional
  • default: undefined
options {}
  • optional
  • default: {}

public cursorNavOps(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

public deleteSelectedOps() source

public downGradeOp(opid: *, opname: *) source

Params:

NameTypeAttributeDescription
opid *
opname *

public focus() source

public focusOp(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public focusOpAnim(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public focusSubpatchOp(subPatchId: *) source

Params:

NameTypeAttributeDescription
subPatchId *

public focusSubpatchOp(subPatchId: *) source

Params:

NameTypeAttributeDescription
subPatchId *

public getAllOpsInBlueprint(subid: *): * source

Params:

NameTypeAttributeDescription
subid *

Return:

*

public getAllSubPatchOps(subid: *): * source

Params:

NameTypeAttributeDescription
subid *

Return:

*

public getBlueprintOpFromBlueprintSubpatchId(bpSubpatchId: *): * source

Params:

NameTypeAttributeDescription
bpSubpatchId *

Return:

*

public getBlueprintOpsForSubPatches(subpatchIds: *, localOnly: boolean): * source

Params:

NameTypeAttributeDescription
subpatchIds *
localOnly boolean
  • optional
  • default: false

Return:

*

public getClosestOp(): * source

Return:

*

public getCurrentSubPatch(): * source

Return:

*

public getDistScore(primAxis: *, secAxis: *, primAxisB: *, secAxisB: *): * source

Params:

NameTypeAttributeDescription
primAxis *
secAxis *
primAxisB *
secAxisB *

Return:

*

public getOpBounds(ops: *, options: {}): * source

Params:

NameTypeAttributeDescription
ops *
options {}
  • optional
  • default: {}

Return:

*

public getPatchOpsUsedInPatch(): * source

Return:

*

public getSelectedOps(): * source

Return:

*

public getSelectedOpsIds(): * source

Return:

*

public getSelectionBounds(minWidth: *): * source

Params:

NameTypeAttributeDescription
minWidth *

Return:

*

public getSubPatchBounds(subPatchId: *): * source

Params:

NameTypeAttributeDescription
subPatchId *

Return:

*

public getSubPatchExposedPorts(subid: *, dir: *): * source

Params:

NameTypeAttributeDescription
subid *
dir *

Return:

*

public getSubPatchIdFromBlueprintOpId(opid: *): * source

Params:

NameTypeAttributeDescription
opid *

Return:

*

public getSubPatchName(subpatch: *): * source

Params:

NameTypeAttributeDescription
subpatch *

Return:

*

public getSubPatchOuterOp(subPatchId: *): * source

Params:

NameTypeAttributeDescription
subPatchId *

Return:

*

public getSubPatches(sort: *): * source

Params:

NameTypeAttributeDescription
sort *

Return:

*

public getSubpatchPathArray(subId: *, arr: *): * source

Params:

NameTypeAttributeDescription
subId *
arr *

Return:

*

public getUserOpsUsedInPatch(): * source

Return:

*

public hasFocus(): * source

Return:

*

public highlightExamplePatchOps() source

Params:

NameTypeAttributeDescription
oldLink *
op *
x *
y *

public isCurrentOp(op: *): * source

Params:

NameTypeAttributeDescription
op *

Return:

*

public isCurrentOpId(opid: *): * source

Params:

NameTypeAttributeDescription
opid *

Return:

*

public linkPortToOp(e: *, opid: *, pid: *, op2id: *) source

Params:

NameTypeAttributeDescription
e *
opid *
pid *
op2id *

public linkPorts(opid: *, pid: *, op2id: *, p2id: *, event: *) source

Params:

NameTypeAttributeDescription
opid *
pid *
op2id *
p2id *
event *

public linkPortsToOp(e: *, opid: *, opids: *, portnames: *) source

Params:

NameTypeAttributeDescription
e *
opid *
opids *
portnames *

public localizeBlueprints() source

public pause() source

public pauseInteraction() source

public refreshCurrentOpParamsByPort(p1: *, p2: *) source

Params:

NameTypeAttributeDescription
p1 *
p2 *

public removeLostSubpatches() source

public replaceOp(opid: *, newOpObjName: *, cb: undefined) source

Params:

NameTypeAttributeDescription
opid *
newOpObjName *
cb undefined
  • optional
  • default: undefined

public replaceOpCheck(opid: *, newOpObjName: *) source

Params:

NameTypeAttributeDescription
opid *
newOpObjName *

public replacePortValues(ops: *, portName: *, valueNew: *, valueOld: *) source

Params:

NameTypeAttributeDescription
ops *
portName *
valueNew *
valueOld *
  • optional
  • default: undefined

public resetOpValues(opid: *, portname: *) source

Params:

NameTypeAttributeDescription
opid *
portname *

public resume() source

public resumeInteraction() source

public saveUndoSelectedOpsPositions(selectedOps: *) source

Params:

NameTypeAttributeDescription
selectedOps *

public selectAllOpsSubPatch(subPatch: *, noUnselect: *) source

Params:

NameTypeAttributeDescription
subPatch *
noUnselect *

public selectChilds(id: *) source

Params:

NameTypeAttributeDescription
id *

public selectOpId(id: *) source

Params:

NameTypeAttributeDescription
id *

public serialize(dataUi: *) source

Params:

NameTypeAttributeDescription
dataUi *

public serializeOps(selectedOps: *, options: {}): {"ops": *} source

Params:

NameTypeAttributeDescription
selectedOps *
options {}
  • optional
  • default: {}

Return:

{"ops": *}

public setCurrentSubPatch(subpatch: *, next: *) source

Params:

NameTypeAttributeDescription
subpatch *
next *

public setExposedPortOrder(port: *, dir: *) source

Params:

NameTypeAttributeDescription
port *
dir *

public setOpColor(col: *): * source

Params:

NameTypeAttributeDescription
col *

Return:

*

public setOpPos(op: *, x: *, y: *) source

Params:

NameTypeAttributeDescription
op *
x *
y *

public setPatchRenderer(id: *, pr: *) source

Params:

NameTypeAttributeDescription
id *
pr *

public setPortTitle(opId: *, portName: *, oldtitle: *) source

Params:

NameTypeAttributeDescription
opId *
portName *
oldtitle *

public setPositionSubPatchInputOutputOps(patchId: *) source

Params:

NameTypeAttributeDescription
patchId *

public setProject(proj: *, cb: *) source

Params:

NameTypeAttributeDescription
proj *
cb *

public setSelectedOpById(opid: *) source

Params:

NameTypeAttributeDescription
opid *

public setSize(x: *, y: *, w: *, h: *) source

Params:

NameTypeAttributeDescription
x *
y *
w *
h *

public setUnsaved() source

public setVisibility(b: *) source

Params:

NameTypeAttributeDescription
b *

public showDefaultPanel() source

public showSelectedOpsPanel() source

public suggestionBetweenTwoOps(op1: *, op2: *) source

Params:

NameTypeAttributeDescription
op1 *
op2 *

public switch(id: *) source

Params:

NameTypeAttributeDescription
id *

public testCollision(op: *) source

Params:

NameTypeAttributeDescription
op *

public toggleVisibility() source

public unlinkPort(opid: *, portid: *) source

Params:

NameTypeAttributeDescription
opid *
portid *

public unlinkSelectedOps(firstOnly: *) source

Params:

NameTypeAttributeDescription
firstOnly *

public unselectAllOps() source

public unselectOpsFromOtherSubpatches() source

public updateBlueprints(blueprintOps: *[]) source

Params:

NameTypeAttributeDescription
blueprintOps *[]
  • optional
  • default: []

public updateBoundingRect() source

public updateSubPatchBreadCrumb(currentSubPatch: *) source

Params:

NameTypeAttributeDescription
currentSubPatch *

public warnLargestPort() source

public zoomStep(step: *) source

Params:

NameTypeAttributeDescription
step *

Private Methods

private _initListeners() source

private _onDeleteOpUndo(op: *) source

Params:

NameTypeAttributeDescription
op *

private _portValidate(p1: *, p2: *) source

Params:

NameTypeAttributeDescription
p1 *
p2 *