GlViewBox
Viewbox of current patch
Constructor Summary
| Public Constructor | ||
| public |
constructor(cgl: CglContext, glPatch: GlPatch) |
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
cursor: * |
|
| public |
glPatch: * |
|
| public get |
height: * |
|
| public |
|
|
| public get |
mousePatchX: * |
|
| public get |
mousePatchY: * |
|
| public get |
mouseX: * |
|
| public get |
mouseY: * |
|
| public get |
scrollX: * |
|
| public get |
scrollXZoom: * |
|
| public get |
scrollY: * |
|
| public get |
scrollYZoom: * |
|
| public |
wheelMode: * |
|
| public get |
width: * |
|
| public get |
zoom: * |
|
| Private Members | ||
| private |
_animScrollX: * |
|
| private |
_animScrollY: * |
|
| private |
_animZoom: * |
|
| private |
_currentSubPatchId: number | string |
|
| private |
|
|
| private |
|
|
| private |
_mousePatchX: * |
|
| private |
_mousePatchY: * |
|
| private |
|
|
| private |
|
|
| private |
_mouseSmooth: * |
|
| private |
|
|
| private |
_mouseX: * |
|
| private |
_mouseY: * |
|
| private |
_oldCenterW: * |
|
| private |
_oldCenterx: * |
|
| private |
_oldCentery: * |
|
| private |
_oldScrollX: * |
|
| private |
_oldScrollY: * |
|
| private |
_outOfBounds: * |
|
| private |
_panStarted: * |
|
| private |
_scrollX: * |
|
| private |
_scrollY: * |
|
| private |
_spaceDown: * |
|
| private |
|
|
| private |
_zoom: * |
|
| private |
cgl: * |
|
| private |
viewResX: * |
|
| private |
viewResY: * |
|
Method Summary
| Public Methods | ||
| public |
animSwitchSubPatch(dur: number, sub: string | number, _timeGrey: number, _timeVisibleAgain: number, next: Function) |
|
| public |
animateScrollTo(x: number, y: number, dur: number, _userInteraction: boolean) |
|
| public |
animateToCenterAt(x: number, y: number) |
|
| public |
|
|
| public |
animateZoom(z: number, dur: number): * |
|
| public |
centerSelectedOps(noAnim: boolean, zoom: boolean) |
|
| public |
deSerialize(dataui: *) |
|
| public |
|
|
| public |
keyScrollX(d: number) |
|
| public |
keyScrollY(d: number) |
|
| public |
patchToScreenConv(_x: any, _y: any): undefined[] |
|
| public |
patchToScreenCoords(_x: number, _y: number): undefined[] |
|
| public |
screenToPatchCoord(x: number, y: number, aspect: boolean): undefined[] |
|
| public |
scrollTo(x: number, y: number, _userInteraction: boolean) |
|
| public |
serialize(dataui: *) |
|
| public |
setMousePos(x: number, y: number) |
|
| public |
setSize(w: number, h: number) |
|
| public |
|
|
| public |
|
|
| public |
update() |
|
| public |
wheelZoom(delta: number) |
|
| public |
zoomStep(s: number) |
|
| Private Methods | ||
| private |
_onCanvasMouseDown(e: PointerEvent) |
|
| private |
_onCanvasMouseEnter(e: MouseEvent) |
|
| private |
_onCanvasMouseLeave(e: MouseEvent) |
|
| private |
_onCanvasMouseMove(e: PointerEvent) |
|
| private |
_onCanvasMouseUp(_e: PointerEvent) |
|
| private |
_onCanvasSpaceDown(_e: MouseEvent) |
|
| private |
_onCanvasSpaceUp(_e: MouseEvent) |
|
| private |
_onCanvasWheel(event: WheelEvent) |
|
| private |
_restoreSubPatch(sub: number | string) |
|
Public Constructors
Public Members
public : * source
public cursor: * source
public glPatch: * source
public get height: * source
public mousePatchNotPredicted: * source
public get mousePatchX: * source
public get mousePatchY: * source
public get mouseX: * source
public get mouseY: * source
public get scrollX: * source
public get scrollXZoom: * source
public get scrollY: * source
public get scrollYZoom: * source
public wheelMode: * source
public get width: * source
public get zoom: * source
Private Members
private _animScrollX: * source
private _animScrollY: * source
private _animZoom: * source
private _currentSubPatchId: number | string source
private _defaultEasing: * source
private _lastPosPixel: * source
private _mousePatchX: * source
private _mousePatchY: * source
private _mouseRightDownStartX: * source
private _mouseRightDownStartY: * source
private _mouseSmooth: * source
private _mouseSmoothCount: * source
private _mouseX: * source
private _mouseY: * source
private _oldCenterW: * source
private _oldCenterx: * source
private _oldCentery: * source
private _oldScrollX: * source
private _oldScrollY: * source
private _outOfBounds: * source
private _panStarted: * source
private _scrollX: * source
private _scrollY: * source
private _spaceDown: * source
private _subPatchViewBoxes: * source
private _zoom: * source
private cgl: * source
private viewResX: * source
private viewResY: * source
Public Methods
public animSwitchSubPatch(dur: number, sub: string | number, _timeGrey: number, _timeVisibleAgain: number, next: Function) source
Params:
| Name | Type | Attribute | Description |
| dur | number | ||
| sub | string | number | ||
| _timeGrey | number |
|
|
| _timeVisibleAgain | number |
|
|
| next | Function |
|
public animateScrollTo(x: number, y: number, dur: number, _userInteraction: boolean) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| dur | number |
|
|
| _userInteraction | boolean |
|
public animateToCenterAt(x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number |
public animateToCenterAtMouseCoords() source
public animateZoom(z: number, dur: number): * source
Params:
| Name | Type | Attribute | Description |
| z | number | ||
| dur | number |
|
Return:
| * |
public centerSelectedOps(noAnim: boolean, zoom: boolean) source
Params:
| Name | Type | Attribute | Description |
| noAnim | boolean |
|
|
| zoom | boolean |
|
public deSerialize(dataui: *) source
Params:
| Name | Type | Attribute | Description |
| dataui | * |
public endResize() source
public keyScrollX(d: number) source
Params:
| Name | Type | Attribute | Description |
| d | number |
public keyScrollY(d: number) source
Params:
| Name | Type | Attribute | Description |
| d | number |
public patchToScreenConv(_x: any, _y: any): undefined[] source
Params:
| Name | Type | Attribute | Description |
| _x | any | ||
| _y | any |
Return:
| undefined[] |
public patchToScreenCoords(_x: number, _y: number): undefined[] source
Params:
| Name | Type | Attribute | Description |
| _x | number | ||
| _y | number |
Return:
| undefined[] |
public screenToPatchCoord(x: number, y: number, aspect: boolean): undefined[] source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| aspect | boolean |
|
Return:
| undefined[] |
public scrollTo(x: number, y: number, _userInteraction: boolean) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| _userInteraction | boolean |
|
public serialize(dataui: *) source
Params:
| Name | Type | Attribute | Description |
| dataui | * |
public setMousePos(x: number, y: number) source
Params:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number |
public setSize(w: number, h: number) source
Params:
| Name | Type | Attribute | Description |
| w | number | ||
| h | number |
public startResize() source
public storeCurrentSubPatch() source
public update() source
public wheelZoom(delta: number) source
Params:
| Name | Type | Attribute | Description |
| delta | number |
public zoomStep(s: number) source
Params:
| Name | Type | Attribute | Description |
| s | number |
Private Methods
private _onCanvasMouseDown(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private _onCanvasMouseEnter(e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent |
private _onCanvasMouseLeave(e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| e | MouseEvent |
private _onCanvasMouseMove(e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| e | PointerEvent |
private _onCanvasMouseUp(_e: PointerEvent) source
Params:
| Name | Type | Attribute | Description |
| _e | PointerEvent |
private _onCanvasSpaceDown(_e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| _e | MouseEvent |
private _onCanvasSpaceUp(_e: MouseEvent) source
Params:
| Name | Type | Attribute | Description |
| _e | MouseEvent |
private _onCanvasWheel(event: WheelEvent) source
Params:
| Name | Type | Attribute | Description |
| event | WheelEvent |
private _restoreSubPatch(sub: number | string) source
Params:
| Name | Type | Attribute | Description |
| sub | number | string |