Winter Cardinal UI - v0.457.0 / ESnapper
EventEmitter
↳ ESnapper
• new ESnapper(parent, theme, options?): ESnapper
| Name | Type |
|---|---|
parent |
ESnapperParent |
theme |
EThemeSnapper |
options? |
ESnapperOptions |
utils.EventEmitter.constructor
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:84
• Protected _isEnabled: boolean
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:77
• Protected _isEnabledDefault: boolean
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:78
• Protected _lengths: number[]
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:63
• Protected _normals: Point[]
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:62
• Protected _parent: ESnapperParent
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:75
• Protected _points: Point[]
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:61
• Protected _workScale: Point
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:65
• Protected _workScaleResult: ESnapperResultScale
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:66
• Protected _workSnap: Point
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:70
• Protected _workSnapRectangle: Rectangle
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:71
• Protected _workSnapResultX: ESnapperResult
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:72
• Protected _workSnapResultY: ESnapperResult
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:73
• Protected _workTranslate: Point
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:68
• grid: ESnapperGrid
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:80
• target: ESnapperTarget
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:82
• get enable(): boolean
boolean
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:121
• set enable(enable): void
| Name | Type |
|---|---|
enable |
boolean |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:125
▸ addListener(event, fn, context?): this
Alias method for on
| Name | Type |
|---|---|
event |
string | symbol |
fn |
Function |
context? |
any |
this
utils.EventEmitter.addListener
node_modules/pixi.js/pixi.js.d.ts:25495
▸ calcNormalizedVector(p0, p1, result): number
| Name | Type |
|---|---|
p0 |
IPoint |
p1 |
IPoint |
result |
Point |
number
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:284
▸ calcScaleSnapped1D(transform, point, normal, length, axis, result): void
| Name | Type |
|---|---|
transform |
Matrix |
point |
Point |
normal |
IPoint |
length |
number |
axis |
boolean |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:361
▸ calcScaleSnapped2D(transform, point, normals, lengths, result): void
| Name | Type |
|---|---|
transform |
Matrix |
point |
Point |
normals |
IPoint[] |
lengths |
number[] |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:420
▸ calcScaleSnappedX(transform, point, normal, length, result): void
| Name | Type |
|---|---|
transform |
Matrix |
point |
Point |
normal |
IPoint |
length |
number |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:400
▸ calcScaleSnappedXY(transform, pointO, pointX, pointY, normals, lengths, result): void
| Name | Type |
|---|---|
transform |
Matrix |
pointO |
Point |
pointX |
Point |
pointY |
Point |
normals |
IPoint[] |
lengths |
number[] |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:474
▸ calcScaleSnappedY(transform, point, normal, length, result): void
| Name | Type |
|---|---|
transform |
Matrix |
point |
Point |
normal |
IPoint |
length |
number |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:410
▸ deserialize(serialized): void
| Name | Type |
|---|---|
serialized |
DDiagramSerializedSnap |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:605
▸ emit(event, ...args): boolean
Calls each of the listeners registered for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
...args |
any[] |
Arguments that are passed to registered listeners |
boolean
true if the event had listeners, else false.
utils.EventEmitter.emit
node_modules/pixi.js/pixi.js.d.ts:25441
▸ eventNames(): (string | symbol)[]
Return an array listing the events for which the emitter has registered listeners.
(string | symbol)[]
utils.EventEmitter.eventNames
node_modules/pixi.js/pixi.js.d.ts:25415
▸ getGridSizeRotation(): number
number
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:245
▸ listenerCount(event): number
Return the number of listeners listening to a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
number
utils.EventEmitter.listenerCount
node_modules/pixi.js/pixi.js.d.ts:25432
▸ listeners(event): Function[]
Return the listeners registered for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
Function[]
utils.EventEmitter.listeners
node_modules/pixi.js/pixi.js.d.ts:25424
▸ off(event, fn?, context?, once?): this
Alias method for removeListener
| Name | Type |
|---|---|
event |
string | symbol |
fn? |
Function |
context? |
any |
once? |
boolean |
this
utils.EventEmitter.off
node_modules/pixi.js/pixi.js.d.ts:25489
▸ on(event, fn, context?): this
Add a listener for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
fn |
Function |
The listener function. |
context? |
any |
The context to invoke the listener with. |
this
this.
utils.EventEmitter.on
node_modules/pixi.js/pixi.js.d.ts:25452
▸ once(event, fn, context?): this
Add a one-time listener for a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
fn |
Function |
The listener function. |
context? |
any |
The context to invoke the listener with. |
this
this.
utils.EventEmitter.once
node_modules/pixi.js/pixi.js.d.ts:25463
▸ prepare(modifier): void
| Name | Type |
|---|---|
modifier |
ESnapperModifier |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:132
▸ prepareForRotate(modifier): void
| Name | Type |
|---|---|
modifier |
ESnapperModifier |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:241
▸ prepareForScale(modifier, anchor): void
| Name | Type |
|---|---|
modifier |
ESnapperModifier |
anchor |
ESnapperModifierAnchor |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:299
▸ prepareForTranslate(modifier): void
| Name | Type |
|---|---|
modifier |
ESnapperModifier |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:152
▸ removeAllListeners(event?): this
Remove all listeners, or those of the specified event.
| Name | Type | Description |
|---|---|---|
event? |
string | symbol |
The event name. |
this
this.
utils.EventEmitter.removeAllListeners
node_modules/pixi.js/pixi.js.d.ts:25483
▸ removeListener(event, fn?, context?, once?): this
Remove the listeners of a given event.
| Name | Type | Description |
|---|---|---|
event |
string | symbol |
The event name. |
fn? |
Function |
Only remove the listeners that match this function. |
context? |
any |
Only remove the listeners that have this context. |
once? |
boolean |
Only remove one-time listeners. |
this
this.
utils.EventEmitter.removeListener
node_modules/pixi.js/pixi.js.d.ts:25475
▸ reset(): void
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:595
▸ serialize(): DDiagramSerializedSnap
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:601
▸ setScaleSnappedResult(distance, length, move, axis, result): void
| Name | Type |
|---|---|
distance |
number |
length |
number |
move |
number |
axis |
boolean |
result |
ESnapperResultScale |
void
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:341
▸ snap(point, result): IPoint
| Name | Type |
|---|---|
point |
IPoint |
result |
IPoint |
IPoint
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:158
▸ toDegree(value): number
| Name | Type |
|---|---|
value |
number |
number
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:253
▸ toRadian(value): number
| Name | Type |
|---|---|
value |
number |
number
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:249
▸ toRotationSnapped(baseRotation, deltaRotation): number
| Name | Type |
|---|---|
baseRotation |
number |
deltaRotation |
number |
number
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:257
▸ toScaleSnapped(transform, anchor, keepRatio, scale): boolean
| Name | Type |
|---|---|
transform |
Matrix |
anchor |
ESnapperModifierAnchor |
keepRatio |
boolean |
scale |
IPoint |
boolean
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:488
▸ toSnapped(point, result): IPoint
| Name | Type |
|---|---|
point |
IPoint |
result |
IPoint |
IPoint
src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:192
▸ toTranslationSnapped(delta, result): IPoint
| Name | Type |
|---|---|
delta |
IPoint |
result |
IPoint |
IPoint