@interactjs / modifiers/Modification / Modification
Class: Modification
modifiers/Modification.Modification
Table of contents
Properties
Methods
- applyToInteraction
- beforeEnd
- copyFrom
- destroy
- fillArg
- prepareStates
- restoreInteractionCoords
- setAll
- setAndApply
- shouldDo
- start
- startAll
- stop
Properties
edges
• edges: EdgeOptions
Defined in
endResult
• endResult: Point
Defined in
interaction
• Readonly
interaction: Readonly
<Interaction
<keyof ActionMap
>>
Defined in
result
• result: ModificationResult
Defined in
startDelta
• startDelta: Point
Defined in
startEdges
• startEdges: EdgeOptions
Defined in
startOffset
• startOffset: Rect
Defined in
states
• states: { index?
: number
; methods?
: { beforeEnd?
: (arg
: ModifierArg
<any
>) => void
| Point
; set?
: (arg
: ModifierArg
<any
>) => any
; start?
: (arg
: ModifierArg
<any
>) => void
; stop?
: (arg
: ModifierArg
<any
>) => void
} ; name?
: any
; options
: unknown
}[] = []
Defined in
Methods
applyToInteraction
â–¸ applyToInteraction(arg
): void
Parameters
Name | Type |
---|---|
arg | Object |
arg.phase | keyof PhaseMap |
arg.rect? | Rect |
Returns
void
Defined in
beforeEnd
â–¸ beforeEnd(arg
): false
| void
Parameters
Name | Type |
---|---|
arg | Omit <DoAnyPhaseArg , "iEvent" > & { state? : { index? : number ; methods? : { beforeEnd? : (arg : ModifierArg <any >) => void | Point ; set? : (arg : ModifierArg <any >) => any ; start? : (arg : ModifierArg <any >) => void ; stop? : (arg : ModifierArg <any >) => void } ; name? : any ; options : unknown } } |
Returns
false
| void
Defined in
copyFrom
â–¸ copyFrom(other
): void
Parameters
Name | Type |
---|---|
other | Modification |
Returns
void
Defined in
destroy
â–¸ destroy(): void
Returns
void
Defined in
fillArg
â–¸ fillArg(arg
): ModifierArg
<{ index?
: number
; methods?
: { beforeEnd?
: (arg
: ModifierArg
<any
>) => void
| Point
; set?
: (arg
: ModifierArg
<any
>) => any
; start?
: (arg
: ModifierArg
<any
>) => void
; stop?
: (arg
: ModifierArg
<any
>) => void
} ; name?
: any
; options
: unknown
}>
Parameters
Name | Type |
---|---|
arg | Partial <ModifierArg <{ index? : number ; methods? : { beforeEnd? : (arg : ModifierArg <any >) => void | Point ; set? : (arg : ModifierArg <any >) => any ; start? : (arg : ModifierArg <any >) => void ; stop? : (arg : ModifierArg <any >) => void } ; name? : any ; options : unknown }>> |
Returns
ModifierArg
<{ index?
: number
; methods?
: { beforeEnd?
: (arg
: ModifierArg
<any
>) => void
| Point
; set?
: (arg
: ModifierArg
<any
>) => any
; start?
: (arg
: ModifierArg
<any
>) => void
; stop?
: (arg
: ModifierArg
<any
>) => void
} ; name?
: any
; options
: unknown
}>
Defined in
prepareStates
â–¸ prepareStates(modifierList
): { index?
: number
; methods?
: { beforeEnd?
: (arg
: ModifierArg
<any
>) => void
| Point
; set?
: (arg
: ModifierArg
<any
>) => any
; start?
: (arg
: ModifierArg
<any
>) => void
; stop?
: (arg
: ModifierArg
<any
>) => void
} ; name?
: any
; options
: unknown
}[]
Parameters
Name | Type |
---|---|
modifierList | Modifier <any , any , any , any >[] |
Returns
{ index?
: number
; methods?
: { beforeEnd?
: (arg
: ModifierArg
<any
>) => void
| Point
; set?
: (arg
: ModifierArg
<any
>) => any
; start?
: (arg
: ModifierArg
<any
>) => void
; stop?
: (arg
: ModifierArg
<any
>) => void
} ; name?
: any
; options
: unknown
}[]
Defined in
restoreInteractionCoords
▸ restoreInteractionCoords(«destructured»
): void
Parameters
Name | Type |
---|---|
«destructured» | Object |
› interaction | Interaction <keyof ActionMap > |
Returns
void
Defined in
setAll
â–¸ setAll(arg
): ModificationResult
Parameters
Name | Type |
---|---|
arg | MethodArg & Partial <ModifierArg <{ index? : number ; methods? : { beforeEnd? : (arg : ModifierArg <any >) => void | Point ; set? : (arg : ModifierArg <any >) => any ; start? : (arg : ModifierArg <any >) => void ; stop? : (arg : ModifierArg <any >) => void } ; name? : any ; options : unknown }>> |
Returns
Defined in
setAndApply
â–¸ setAndApply(arg
): false
| void
Parameters
Name | Type |
---|---|
arg | Partial <DoAnyPhaseArg > & { modifiedCoords? : Point ; phase : keyof PhaseMap ; preEnd? : boolean ; skipModifiers? : number } |
Returns
false
| void
Defined in
shouldDo
â–¸ shouldDo(options
, preEnd?
, phase?
, requireEndOnly?
): boolean
Parameters
Name | Type |
---|---|
options | any |
preEnd? | boolean |
phase? | string |
requireEndOnly? | boolean |
Returns
boolean
Defined in
start
▸ start(«destructured»
, pageCoords
): ModificationResult
Parameters
Name | Type |
---|---|
«destructured» | Object |
› phase | keyof PhaseMap |
pageCoords | Point |
Returns
Defined in
startAll
â–¸ startAll(arg
): void
Parameters
Name | Type |
---|---|
arg | MethodArg & Partial <ModifierArg <{ index? : number ; methods? : { beforeEnd? : (arg : ModifierArg <any >) => void | Point ; set? : (arg : ModifierArg <any >) => any ; start? : (arg : ModifierArg <any >) => void ; stop? : (arg : ModifierArg <any >) => void } ; name? : any ; options : unknown }>> |
Returns
void
Defined in
stop
â–¸ stop(arg
): void
Parameters
Name | Type |
---|---|
arg | Object |
arg.interaction | Interaction <keyof ActionMap > |
Returns
void