PatchView
Extends:
manage patch view and helper functions
Static Method Summary
| Static Public Methods | ||
| public static |
getElement(): * |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(corepatch: Patch<any>) |
|
Member Summary
| Public Members | ||
| public |
boundingRect: * |
|
| public |
currentOpPaste: Object |
|
| public get |
element: * |
|
| public |
hasOldOps: boolean |
|
| public |
hasUiErrors: boolean |
|
| public |
isPasting: boolean |
|
| public |
newPatchOpPaste: String |
|
| public get |
|
|
| public get |
rendererName: * |
|
| public |
store: * |
|
| Private Members | ||
| private |
|
|
| private |
|
|
| private |
_element: * |
|
| private |
_lastTempOP: * |
|
| private |
_log: * |
|
| private |
_p: Patch |
|
| private |
|
|
| private |
_pvRenderers: {} |
|
| private |
_showingNavHelperEmpty: boolean |
|
Method Summary
| Public Methods | ||
| public |
addAssetOpAuto(filename: string, event: PointerEvent) |
|
| public |
addOp(opname: string, options: AddOpOptions) |
|
| public |
addOpAndLink(opname: string, opid: string, portname: string, cb: function) |
|
| public |
|
|
| public |
|
|
| public |
alignOpBelowOp(opBelow: UiOp, opAbove: UiOp) |
|
| public |
alignOps(selectedOps: *): * |
|
| public |
alignSelectedOpsHor(ops: Op[]): * |
|
| public |
alignSelectedOpsVert(ops: UiOp[]): * |
|
| public |
centerSelectOp(opid: String) |
|
| public |
centerSubPatchBounds(subPatch: *) |
|
| public |
centerView(x: number, y: number) |
|
| public |
|
|
| public |
|
|
| public |
checkPatchOutdated(setUiError: boolean) |
|
| public |
cleanOps(ops: Op[]) |
|
| public |
|
|
| public |
clickSubPatchNav(subPatchId: String) |
|
| public |
clipboardCopyOps(e: ClipboardEvent) |
|
| public |
clipboardCutOps(e: ClipboardEvent) |
|
| public |
clipboardPaste(e: ClipboardEvent, oldSub: String, mouseX: Number, mouseY: Number, next: Function) |
|
| public |
compressSelectedOps(ops: Op<any>[]) |
|
| 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: string) |
|
| public |
focusOpAnim(opid: string) |
|
| public |
focusSubpatchOp(subPatchId: String) |
|
| public |
getAllOpsInBlueprint(subid: string): * |
|
| public |
getAllSubPatchOps(subid: string | number): * |
|
| public |
getBlueprintOpFromBlueprintSubpatchId(bpSubpatchId: string): * |
|
| public |
getClosestOp(): * |
|
| public |
getCurrentSubPatch(): String | number |
|
| public |
getDistScore(primAxis: *, secAxis: *, primAxisB: *, secAxisB: *): * |
|
| public |
getLastFocussedOp(): * |
|
| public |
getNumSelectedOps(): * |
|
| public |
getOpBounds(ops: *, options: {}): * |
|
| public |
|
|
| public |
getSelectedOps(): Op<any>[] |
|
| public |
getSelectedOpsIds(): * |
|
| public |
getSelectionBounds(minWidth: *): * |
|
| public |
getSubPatchBounds(subPatchId: *): * |
|
| public |
getSubPatchExposedPorts(_subid: *, _dir: *): * |
|
| public |
getSubPatchName(subpatch: *): * |
|
| public |
getSubPatchOuterOp(subPatchId: string | number): UiOp |
|
| public |
getSubPatches(sort: boolean): * |
|
| public |
getSubpatchPathArray(subId: string | number, arr: Object[]): * |
|
| public |
getUrlInputPorts(): * |
|
| public |
|
|
| public |
gotoOp(opId: string, options: GotoOpOptions) |
|
| public |
hasFocus(): Boolean |
|
| public |
|
|
| public |
insertOpInLink(oldLink: object, op: Op, x: number, y: number) |
|
| public |
isCurrentOp(op: Op): * |
|
| public |
isCurrentOpId(opid: string): * |
|
| public |
linkPortToOp(e: MouseEvent, opid: string, pid: string, op2id: string) |
|
| public |
linkPorts(opid: string, pid: string, op2id: string, p2id: string, event: MouseEvent) |
|
| public |
linkPortsToOp(e: MouseEvent, opid: string, opids: string[], portnames: string[], showConverters: boolean) |
|
| public |
pause() |
|
| public |
|
|
| public |
refreshCurrentOpParamsByPort(p1: Port, p2: Port) |
|
| public |
|
|
| public |
replaceOp(opid: string, newOpObjName: string, cb: function) |
|
| public |
replaceOpCheck(opid: *, newOpObjName: *) |
|
| public |
replacePortValues(ops: *, portName: *, valueNew: *, valueOld: *) |
|
| public |
resetOpValues(opid: string, portname: string) |
|
| public |
resume() |
|
| public |
|
|
| public |
saveUndoSelectedOpsPositions(selectedOps: UiOp[]) |
|
| public |
selectAllOpsSubPatch(subPatch: string | number, noUnselect: boolean) |
|
| public |
selectChilds(id: String) |
|
| public |
selectOpId(id: String) |
|
| public |
serialize(dataUi: *) |
|
| public |
serializeOps(selectedOps: Op[], _options: *): {"ops": *} |
|
| public |
setCurrentSubPatch(subpatch: string | number, next: Function) |
|
| public |
setExposedPortOrder(port: Port, dir: number) |
|
| public |
setOpColor(col: String): * |
|
| public |
setOpPos(op: UiOp | Op, x: number, y: number) |
|
| public |
setPatchRenderer(id: *, pr: *) |
|
| public |
setPortTitle(opId: *, portName: *, oldtitle: *) |
|
| public |
setPositionSubPatchInputOutputOps(patchId: string | number) |
|
| public |
setProject(proj: *, cb: *) |
|
| public |
setSelectedOpById(opid: String) |
|
| public |
setSize(x: Number, y: Number, w: Number, h: Number) |
|
| public |
|
|
| public |
setVisibility(b: boolean) |
|
| public |
|
|
| public |
|
|
| public |
suggestionBetweenTwoOps(op1: UiOp, op2: UiOp) |
|
| public |
switch(id: String) |
|
| public |
testCollision(op: UiOp) |
|
| public |
|
|
| public |
unlinkPort(opid: *, portid: *) |
|
| public |
unlinkSelectedOps(firstOnly: boolean) |
|
| public |
|
|
| public |
|
|
| public |
updateBlueprints(blueprintOps: *[]) |
|
| public |
|
|
| public |
updateSubPatchBreadCrumb(currentSubPatch: String | Number) |
|
| public |
|
|
| public |
zoomStep(step: number) |
|
| Private Methods | ||
| private |
|
|
| private |
_onDeleteOpUndo(op: Op) |
|
| private |
_portValidate(p1: Port, p2: Port) |
|
Static Public Methods
Public Constructors
public constructor(corepatch: Patch<any>) source
Params:
| Name | Type | Attribute | Description |
| corepatch | Patch<any> |
Public Members
public boundingRect: * source
public currentOpPaste: Object source
public get element: * source
public hasOldOps: boolean source
public hasUiErrors: boolean source
public isPasting: boolean source
public newPatchOpPaste: String 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
private _p: Patch source
private _pvRenderers: {} source
private _showingNavHelperEmpty: boolean source
Public Methods
public addAssetOpAuto(filename: string, event: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| filename | string | ||
| event | PointerEvent |
public addOp(opname: string, options: AddOpOptions) source
Params:
| Name | Type | Attribute | Description |
| opname | string | ||
| options | AddOpOptions |
|
public addOpAndLink(opname: string, opid: string, portname: string, cb: function) source
Params:
| Name | Type | Attribute | Description |
| opname | string | ||
| opid | string | ||
| portname | string | ||
| cb | function |
|
public addSpaceBetweenOpsX() source
public addSpaceBetweenOpsY() source
public alignOps(selectedOps: *): * source
Params:
| Name | Type | Attribute | Description |
| selectedOps | * |
Return:
| * |
public alignSelectedOpsHor(ops: Op[]): * source
Params:
| Name | Type | Attribute | Description |
| ops | Op[] |
Return:
| * |
public alignSelectedOpsVert(ops: UiOp[]): * source
Params:
| Name | Type | Attribute | Description |
| ops | UiOp[] |
Return:
| * |
public centerSelectOp(opid: String) source
Params:
| Name | Type | Attribute | Description |
| opid | String |
public centerSubPatchBounds(subPatch: *) source
Params:
| Name | Type | Attribute | Description |
| subPatch | * |
public centerView(x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| x | number |
|
|
| y | number |
|
public checkPatchErrors() source
public checkPatchErrorsSoon() source
public checkPatchOutdated(setUiError: boolean) source
Params:
| Name | Type | Attribute | Description |
| setUiError | boolean |
|
public cleanOps(ops: Op[]) source
Params:
| Name | Type | Attribute | Description |
| ops | Op[] |
public clearPatch() source
public clickSubPatchNav(subPatchId: String) source
Params:
| Name | Type | Attribute | Description |
| subPatchId | String |
public clipboardCopyOps(e: ClipboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent |
public clipboardCutOps(e: ClipboardEvent) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent |
public clipboardPaste(e: ClipboardEvent, oldSub: String, mouseX: Number, mouseY: Number, next: Function) source
Params:
| Name | Type | Attribute | Description |
| e | ClipboardEvent | ||
| oldSub | String | ||
| mouseX | Number | ||
| mouseY | Number | ||
| next | Function |
|
public compressSelectedOps(ops: Op<any>[]) source
Params:
| Name | Type | Attribute | Description |
| ops | Op<any>[] |
public copyOpInputPorts(origOp: *, newOp: *) source
Params:
| Name | Type | Attribute | Description |
| origOp | * | ||
| newOp | * |
public createAreaFromSelection() source
public createSubPatchFromSelection(version: number, next: undefined, options: {}) source
Params:
| Name | Type | Attribute | Description |
| version | number |
|
|
| next | undefined |
|
|
| options | {} |
|
public cursorNavOps(x: *, y: *) source
Params:
| Name | Type | Attribute | Description |
| x | * | ||
| y | * |
public deleteSelectedOps() source
public downGradeOp(opid: *, opname: *) source
Params:
| Name | Type | Attribute | Description |
| opid | * | ||
| opname | * |
public focus() source
public focusOp(opid: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string |
public focusOpAnim(opid: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string |
public focusSubpatchOp(subPatchId: String) source
Params:
| Name | Type | Attribute | Description |
| subPatchId | String |
public getAllOpsInBlueprint(subid: string): * source
Params:
| Name | Type | Attribute | Description |
| subid | string |
Return:
| * |
public getAllSubPatchOps(subid: string | number): * source
Params:
| Name | Type | Attribute | Description |
| subid | string | number |
Return:
| * |
public getBlueprintOpFromBlueprintSubpatchId(bpSubpatchId: string): * source
Params:
| Name | Type | Attribute | Description |
| bpSubpatchId | string |
Return:
| * |
public getDistScore(primAxis: *, secAxis: *, primAxisB: *, secAxisB: *): * source
Params:
| Name | Type | Attribute | Description |
| primAxis | * | ||
| secAxis | * | ||
| primAxisB | * | ||
| secAxisB | * |
Return:
| * |
public getOpBounds(ops: *, options: {}): * source
Params:
| Name | Type | Attribute | Description |
| ops | * | ||
| options | {} |
|
Return:
| * |
public getSelectionBounds(minWidth: *): * source
Params:
| Name | Type | Attribute | Description |
| minWidth | * |
Return:
| * |
public getSubPatchBounds(subPatchId: *): * source
Params:
| Name | Type | Attribute | Description |
| subPatchId | * |
Return:
| * |
public getSubPatchExposedPorts(_subid: *, _dir: *): * source
Params:
| Name | Type | Attribute | Description |
| _subid | * | ||
| _dir | * |
Return:
| * |
public getSubPatchName(subpatch: *): * source
Params:
| Name | Type | Attribute | Description |
| subpatch | * |
Return:
| * |
public getSubPatchOuterOp(subPatchId: string | number): UiOp source
Params:
| Name | Type | Attribute | Description |
| subPatchId | string | number |
public getSubPatches(sort: boolean): * source
Params:
| Name | Type | Attribute | Description |
| sort | boolean |
Return:
| * |
public getSubpatchPathArray(subId: string | number, arr: Object[]): * source
Params:
| Name | Type | Attribute | Description |
| subId | string | number | ||
| arr | Object[] |
|
Return:
| * |
public gotoOp(opId: string, options: GotoOpOptions) source
Params:
| Name | Type | Attribute | Description |
| opId | string | ||
| options | GotoOpOptions |
|
public highlightExamplePatchOps() source
public insertOpInLink(oldLink: object, op: Op, x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| oldLink | object | ||
| op | Op | ||
| x | number | ||
| y | number |
public isCurrentOpId(opid: string): * source
Params:
| Name | Type | Attribute | Description |
| opid | string |
Return:
| * |
public linkPortToOp(e: MouseEvent, opid: string, pid: string, op2id: string) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent | ||
| opid | string | ||
| pid | string | ||
| op2id | string |
public linkPorts(opid: string, pid: string, op2id: string, p2id: string, event: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| opid | string | ||
| pid | string | ||
| op2id | string | ||
| p2id | string | ||
| event | MouseEvent |
public linkPortsToOp(e: MouseEvent, opid: string, opids: string[], portnames: string[], showConverters: boolean) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent | ||
| opid | string | ||
| opids | string[] | ||
| portnames | string[] | ||
| showConverters | boolean |
public pause() source
public pauseInteraction() source
public refreshCurrentOpParamsByPort(p1: Port, p2: Port) source
Params:
| Name | Type | Attribute | Description |
| p1 | Port | ||
| p2 | Port |
public removeLostSubpatches() source
public replaceOp(opid: string, newOpObjName: string, cb: function) source
Params:
| Name | Type | Attribute | Description |
| opid | string | ||
| newOpObjName | string | ||
| cb | function |
public replaceOpCheck(opid: *, newOpObjName: *) source
Params:
| Name | Type | Attribute | Description |
| opid | * | ||
| newOpObjName | * |
public replacePortValues(ops: *, portName: *, valueNew: *, valueOld: *) source
Params:
| Name | Type | Attribute | Description |
| ops | * | ||
| portName | * | ||
| valueNew | * | ||
| valueOld | * |
|
public resetOpValues(opid: string, portname: string) source
Params:
| Name | Type | Attribute | Description |
| opid | string | ||
| portname | string |
|
public resume() source
public resumeInteraction() source
public saveUndoSelectedOpsPositions(selectedOps: UiOp[]) source
Params:
| Name | Type | Attribute | Description |
| selectedOps | UiOp[] |
public selectAllOpsSubPatch(subPatch: string | number, noUnselect: boolean) source
Params:
| Name | Type | Attribute | Description |
| subPatch | string | number | ||
| noUnselect | boolean |
|
public selectChilds(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public selectOpId(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public serialize(dataUi: *) source
Params:
| Name | Type | Attribute | Description |
| dataUi | * |
public serializeOps(selectedOps: Op[], _options: *): {"ops": *} source
Params:
| Name | Type | Attribute | Description |
| selectedOps | Op[] | ||
| _options | * |
Return:
| {"ops": *} |
public setCurrentSubPatch(subpatch: string | number, next: Function) source
Params:
| Name | Type | Attribute | Description |
| subpatch | string | number | ||
| next | Function |
|
public setExposedPortOrder(port: Port, dir: number) source
Params:
| Name | Type | Attribute | Description |
| port | Port | ||
| dir | number |
public setOpPos(op: UiOp | Op, x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| op | UiOp | Op | ||
| x | number | ||
| y | number |
public setPatchRenderer(id: *, pr: *) source
Params:
| Name | Type | Attribute | Description |
| id | * | ||
| pr | * |
public setPortTitle(opId: *, portName: *, oldtitle: *) source
Params:
| Name | Type | Attribute | Description |
| opId | * | ||
| portName | * | ||
| oldtitle | * |
public setPositionSubPatchInputOutputOps(patchId: string | number) source
Params:
| Name | Type | Attribute | Description |
| patchId | string | number |
|
public setProject(proj: *, cb: *) source
Params:
| Name | Type | Attribute | Description |
| proj | * | ||
| cb | * |
public setSelectedOpById(opid: String) source
Params:
| Name | Type | Attribute | Description |
| opid | String |
public setSize(x: Number, y: Number, w: Number, h: Number) source
Params:
| Name | Type | Attribute | Description |
| x | Number | ||
| y | Number | ||
| w | Number | ||
| h | Number |
public setUnsaved() source
public setVisibility(b: boolean) source
Params:
| Name | Type | Attribute | Description |
| b | boolean |
public showDefaultPanel() source
public showSelectedOpsPanel() source
public switch(id: String) source
Params:
| Name | Type | Attribute | Description |
| id | String |
public toggleVisibility() source
public unlinkPort(opid: *, portid: *) source
Params:
| Name | Type | Attribute | Description |
| opid | * | ||
| portid | * |
public unlinkSelectedOps(firstOnly: boolean) source
Params:
| Name | Type | Attribute | Description |
| firstOnly | boolean |
|
public unselectAllOps() source
public unselectOpsFromOtherSubpatches() source
public updateBlueprints(blueprintOps: *[]) source
Params:
| Name | Type | Attribute | Description |
| blueprintOps | *[] |
|
public updateBoundingRect() source
public updateSubPatchBreadCrumb(currentSubPatch: String | Number) source
Params:
| Name | Type | Attribute | Description |
| currentSubPatch | String | Number |
public warnLargestPort() source
public zoomStep(step: number) source
Params:
| Name | Type | Attribute | Description |
| step | number |
Private Methods
private _initListeners() source
private _onDeleteOpUndo(op: Op) source
Params:
| Name | Type | Attribute | Description |
| op | Op |
private _portValidate(p1: Port, p2: Port) source
Params:
| Name | Type | Attribute | Description |
| p1 | Port | ||
| p2 | Port |