Winter Cardinal UI - v0.442.0 / ESnapper

Class: ESnapper

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ESnapper(parent, theme, options?): ESnapper

Parameters

Name Type
parent ESnapperParent
theme EThemeSnapper
options? ESnapperOptions

Returns

ESnapper

Overrides

utils.EventEmitter.constructor

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:84

Properties

_isEnabled

Protected _isEnabled: boolean

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:77


_isEnabledDefault

Protected _isEnabledDefault: boolean

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:78


_lengths

Protected _lengths: number[]

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:63


_normals

Protected _normals: Point[]

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:62


_parent

Protected _parent: ESnapperParent

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:75


_points

Protected _points: Point[]

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:61


_workScale

Protected _workScale: Point

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:65


_workScaleResult

Protected _workScaleResult: ESnapperResultScale

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:66


_workSnap

Protected _workSnap: Point

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:70


_workSnapRectangle

Protected _workSnapRectangle: Rectangle

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:71


_workSnapResultX

Protected _workSnapResultX: ESnapperResult

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:72


_workSnapResultY

Protected _workSnapResultY: ESnapperResult

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:73


_workTranslate

Protected _workTranslate: Point

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:68


grid

grid: ESnapperGrid

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:80


target

target: ESnapperTarget

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:82

Accessors

enable

get enable(): boolean

Returns

boolean

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:121

set enable(enable): void

Parameters

Name Type
enable boolean

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:125

Methods

addListener

addListener(event, fn, context?): this

Alias method for on

Parameters

Name Type
event string | symbol
fn Function
context? any

Returns

this

Inherited from

utils.EventEmitter.addListener

Defined in

node_modules/pixi.js/pixi.js.d.ts:25495


calcNormalizedVector

calcNormalizedVector(p0, p1, result): number

Parameters

Name Type
p0 IPoint
p1 IPoint
result Point

Returns

number

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:284


calcScaleSnapped1D

calcScaleSnapped1D(transform, point, normal, length, axis, result): void

Parameters

Name Type
transform Matrix
point Point
normal IPoint
length number
axis boolean
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:361


calcScaleSnapped2D

calcScaleSnapped2D(transform, point, normals, lengths, result): void

Parameters

Name Type
transform Matrix
point Point
normals IPoint[]
lengths number[]
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:420


calcScaleSnappedX

calcScaleSnappedX(transform, point, normal, length, result): void

Parameters

Name Type
transform Matrix
point Point
normal IPoint
length number
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:400


calcScaleSnappedXY

calcScaleSnappedXY(transform, pointO, pointX, pointY, normals, lengths, result): void

Parameters

Name Type
transform Matrix
pointO Point
pointX Point
pointY Point
normals IPoint[]
lengths number[]
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:474


calcScaleSnappedY

calcScaleSnappedY(transform, point, normal, length, result): void

Parameters

Name Type
transform Matrix
point Point
normal IPoint
length number
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:410


deserialize

deserialize(serialized): void

Parameters

Name Type
serialized DDiagramSerializedSnap

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:605


emit

emit(event, ...args): boolean

Calls each of the listeners registered for a given event.

Parameters

Name Type Description
event string | symbol The event name.
...args any[] Arguments that are passed to registered listeners

Returns

boolean

true if the event had listeners, else false.

Inherited from

utils.EventEmitter.emit

Defined in

node_modules/pixi.js/pixi.js.d.ts:25441


eventNames

eventNames(): (string | symbol)[]

Return an array listing the events for which the emitter has registered listeners.

Returns

(string | symbol)[]

Inherited from

utils.EventEmitter.eventNames

Defined in

node_modules/pixi.js/pixi.js.d.ts:25415


getGridSizeRotation

getGridSizeRotation(): number

Returns

number

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:245


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type Description
event string | symbol The event name.

Returns

number

Inherited from

utils.EventEmitter.listenerCount

Defined in

node_modules/pixi.js/pixi.js.d.ts:25432


listeners

listeners(event): Function[]

Return the listeners registered for a given event.

Parameters

Name Type Description
event string | symbol The event name.

Returns

Function[]

Inherited from

utils.EventEmitter.listeners

Defined in

node_modules/pixi.js/pixi.js.d.ts:25424


off

off(event, fn?, context?, once?): this

Alias method for removeListener

Parameters

Name Type
event string | symbol
fn? Function
context? any
once? boolean

Returns

this

Inherited from

utils.EventEmitter.off

Defined in

node_modules/pixi.js/pixi.js.d.ts:25489


on

on(event, fn, context?): this

Add a listener for a given event.

Parameters

Name Type Description
event string | symbol The event name.
fn Function The listener function.
context? any The context to invoke the listener with.

Returns

this

this.

Inherited from

utils.EventEmitter.on

Defined in

node_modules/pixi.js/pixi.js.d.ts:25452


once

once(event, fn, context?): this

Add a one-time listener for a given event.

Parameters

Name Type Description
event string | symbol The event name.
fn Function The listener function.
context? any The context to invoke the listener with.

Returns

this

this.

Inherited from

utils.EventEmitter.once

Defined in

node_modules/pixi.js/pixi.js.d.ts:25463


prepare

prepare(modifier): void

Parameters

Name Type
modifier ESnapperModifier

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:132


prepareForRotate

prepareForRotate(modifier): void

Parameters

Name Type
modifier ESnapperModifier

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:241


prepareForScale

prepareForScale(modifier, anchor): void

Parameters

Name Type
modifier ESnapperModifier
anchor ESnapperModifierAnchor

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:299


prepareForTranslate

prepareForTranslate(modifier): void

Parameters

Name Type
modifier ESnapperModifier

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:152


removeAllListeners

removeAllListeners(event?): this

Remove all listeners, or those of the specified event.

Parameters

Name Type Description
event? string | symbol The event name.

Returns

this

this.

Inherited from

utils.EventEmitter.removeAllListeners

Defined in

node_modules/pixi.js/pixi.js.d.ts:25483


removeListener

removeListener(event, fn?, context?, once?): this

Remove the listeners of a given event.

Parameters

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.

Returns

this

this.

Inherited from

utils.EventEmitter.removeListener

Defined in

node_modules/pixi.js/pixi.js.d.ts:25475


reset

reset(): void

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:595


serialize

serialize(): DDiagramSerializedSnap

Returns

DDiagramSerializedSnap

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:601


setScaleSnappedResult

setScaleSnappedResult(distance, length, move, axis, result): void

Parameters

Name Type
distance number
length number
move number
axis boolean
result ESnapperResultScale

Returns

void

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:341


snap

snap(point, result): IPoint

Parameters

Name Type
point IPoint
result IPoint

Returns

IPoint

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:158


toDegree

toDegree(value): number

Parameters

Name Type
value number

Returns

number

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:253


toRadian

toRadian(value): number

Parameters

Name Type
value number

Returns

number

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:249


toRotationSnapped

toRotationSnapped(baseRotation, deltaRotation): number

Parameters

Name Type
baseRotation number
deltaRotation number

Returns

number

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:257


toScaleSnapped

toScaleSnapped(transform, anchor, keepRatio, scale): boolean

Parameters

Name Type
transform Matrix
anchor ESnapperModifierAnchor
keepRatio boolean
scale IPoint

Returns

boolean

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:488


toSnapped

toSnapped(point, result): IPoint

Parameters

Name Type
point IPoint
result IPoint

Returns

IPoint

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:192


toTranslationSnapped

toTranslationSnapped(delta, result): IPoint

Parameters

Name Type
delta IPoint
result IPoint

Returns

IPoint

Defined in

src/main/typescript/wcardinal/ui/snapper/e-snapper.ts:206