custom-belt-lib / Modules / CustomBelt / CustomBelt
Class: CustomBelt
CustomBelt.CustomBelt
Table of contents
Constructors
Properties
- beltAttributes
- clickCount
- clickDelay
- clickTimer
- currentBelt
- currentIndex
- customBeltInit
- elements
- refreshIntervalId
- svgString
- valid
Methods
- additionalStyles
- borderColor
- destroy
- doCallback
- downLoadSVG
- getColor
- getSVGString
- getStripeIndex
- hasPatch
- hasProfessorPatch
- initElements
- isValid
- oneClick
- patchBorderColor
- patchColor
- professorPatchColor
- refreshElements
- stripe
- stripeStyle
- transition
- transitionNextBelt
Constructors
constructor
• new CustomBelt(customBeltInit
, beltAttributes?
)
Instantiate a new CustomBelt object
Parameters
Name | Type | Default value | Description |
---|---|---|---|
customBeltInit | CustomBeltInit | undefined | initialization object |
beltAttributes | null | BeltAttributes | null | - |
Defined in
Properties
beltAttributes
• beltAttributes: BeltAttributes
Defined in
clickCount
• clickCount: number
= 0
Defined in
clickDelay
• clickDelay: number
= 700
Defined in
clickTimer
• clickTimer: undefined
| Timeout
= undefined
Defined in
currentBelt
• currentBelt: null
| BeltProps
Defined in
currentIndex
• currentIndex: number
Defined in
customBeltInit
• customBeltInit: CustomBeltInit
Defined in
elements
• elements: HTMLElement
[]
Defined in
refreshIntervalId
• refreshIntervalId: undefined
| Timeout
= undefined
Defined in
svgString
• svgString: string
= ''
Defined in
valid
• valid: boolean
= true
Defined in
Methods
additionalStyles
▸ additionalStyles(): string
Returns
string
Defined in
borderColor
▸ borderColor(): string
Returns
string
Defined in
destroy
▸ destroy(): void
Returns
void
Defined in
doCallback
▸ doCallback(event
, callbackType
): void
Parameters
Name | Type |
---|---|
event | null | Event |
callbackType | BeltCallbackType |
Returns
void
Defined in
downLoadSVG
▸ downLoadSVG(event
): void
Parameters
Name | Type |
---|---|
event | Event |
Returns
void
Defined in
getColor
▸ getColor(hexColor
): string
Parameters
Name | Type |
---|---|
hexColor | string |
Returns
string
Defined in
getSVGString
▸ getSVGString(): string
Returns
string
Defined in
getStripeIndex
▸ getStripeIndex(stripeCount
): number
Parameters
Name | Type |
---|---|
stripeCount | number |
Returns
number
Defined in
hasPatch
▸ hasPatch(): string
Returns
string
Defined in
hasProfessorPatch
▸ hasProfessorPatch(): string
Returns
string
Defined in
initElements
▸ initElements(): HTMLElement
[]
Returns
HTMLElement
[]
Defined in
isValid
▸ isValid(): boolean
Returns
boolean
Defined in
oneClick
▸ oneClick(event
): void
Parameters
Name | Type |
---|---|
event | Event |
Returns
void
Defined in
patchBorderColor
▸ patchBorderColor(): string
Returns
string
Defined in
patchColor
▸ patchColor(): string
Returns
string
Defined in
professorPatchColor
▸ professorPatchColor(): string
Returns
string
Defined in
refreshElements
▸ refreshElements(): void
Returns
void
Defined in
stripe
▸ stripe(stripeCount
): string
Parameters
Name | Type |
---|---|
stripeCount | number |
Returns
string
Defined in
stripeStyle
▸ stripeStyle(stripeCount
, fillColor
): string
Parameters
Name | Type |
---|---|
stripeCount | number |
fillColor | string |
Returns
string
Defined in
transition
▸ transition(): string
Returns
string
Defined in
transitionNextBelt
▸ transitionNextBelt(): void
Returns
void