Skip to content
On this page

custom-belt-lib / Modules / CustomBelt / CustomBelt

Class: CustomBelt ​

CustomBelt.CustomBelt


Table of contents ​

Constructors ​

Properties ​

Methods ​

Constructors ​

constructor ​

• new CustomBelt(customBeltInit, beltAttributes?)

Instantiate a new CustomBelt object

Parameters ​

NameTypeDefault valueDescription
customBeltInitCustomBeltInitundefinedinitialization object
beltAttributesnull | BeltAttributesnull-

Defined in ​

CustomBelt.ts:70

Properties ​

beltAttributes ​

• beltAttributes: BeltAttributes

Defined in ​

CustomBelt.ts:55


clickCount ​

• clickCount: number = 0

Defined in ​

CustomBelt.ts:62


clickDelay ​

• clickDelay: number = 700

Defined in ​

CustomBelt.ts:61


clickTimer ​

• clickTimer: undefined | Timeout = undefined

Defined in ​

CustomBelt.ts:63


currentBelt ​

• currentBelt: null | BeltProps

Defined in ​

CustomBelt.ts:57


currentIndex ​

• currentIndex: number

Defined in ​

CustomBelt.ts:58


customBeltInit ​

• customBeltInit: CustomBeltInit

Defined in ​

CustomBelt.ts:56


elements ​

• elements: HTMLElement[]

Defined in ​

CustomBelt.ts:59


refreshIntervalId ​

• refreshIntervalId: undefined | Timeout = undefined

Defined in ​

CustomBelt.ts:60


svgString ​

• svgString: string = ''

Defined in ​

CustomBelt.ts:64


valid ​

• valid: boolean = true

Defined in ​

CustomBelt.ts:65

Methods ​

additionalStyles ​

▸ additionalStyles(): string

Returns ​

string

Defined in ​

CustomBelt.ts:112


borderColor ​

▸ borderColor(): string

Returns ​

string

Defined in ​

CustomBelt.ts:116


destroy ​

▸ destroy(): void

Returns ​

void

Defined in ​

CustomBelt.ts:123


doCallback ​

▸ doCallback(event, callbackType): void

Parameters ​

NameType
eventnull | Event
callbackTypeBeltCallbackType

Returns ​

void

Defined in ​

CustomBelt.ts:132


downLoadSVG ​

▸ downLoadSVG(event): void

Parameters ​

NameType
eventEvent

Returns ​

void

Defined in ​

CustomBelt.ts:138


getColor ​

▸ getColor(hexColor): string

Parameters ​

NameType
hexColorstring

Returns ​

string

Defined in ​

CustomBelt.ts:161


getSVGString ​

▸ getSVGString(): string

Returns ​

string

Defined in ​

CustomBelt.ts:181


getStripeIndex ​

▸ getStripeIndex(stripeCount): number

Parameters ​

NameType
stripeCountnumber

Returns ​

number

Defined in ​

CustomBelt.ts:170


hasPatch ​

▸ hasPatch(): string

Returns ​

string

Defined in ​

CustomBelt.ts:656


hasProfessorPatch ​

▸ hasProfessorPatch(): string

Returns ​

string

Defined in ​

CustomBelt.ts:663


initElements ​

▸ initElements(): HTMLElement[]

Returns ​

HTMLElement[]

Defined in ​

CustomBelt.ts:670


isValid ​

▸ isValid(): boolean

Returns ​

boolean

Defined in ​

CustomBelt.ts:701


oneClick ​

▸ oneClick(event): void

Parameters ​

NameType
eventEvent

Returns ​

void

Defined in ​

CustomBelt.ts:705


patchBorderColor ​

▸ patchBorderColor(): string

Returns ​

string

Defined in ​

CustomBelt.ts:729


patchColor ​

▸ patchColor(): string

Returns ​

string

Defined in ​

CustomBelt.ts:722


professorPatchColor ​

▸ professorPatchColor(): string

Returns ​

string

Defined in ​

CustomBelt.ts:736


refreshElements ​

▸ refreshElements(): void

Returns ​

void

Defined in ​

CustomBelt.ts:743


stripe ​

▸ stripe(stripeCount): string

Parameters ​

NameType
stripeCountnumber

Returns ​

string

Defined in ​

CustomBelt.ts:751


stripeStyle ​

▸ stripeStyle(stripeCount, fillColor): string

Parameters ​

NameType
stripeCountnumber
fillColorstring

Returns ​

string

Defined in ​

CustomBelt.ts:794


transition ​

▸ transition(): string

Returns ​

string

Defined in ​

CustomBelt.ts:805


transitionNextBelt ​

▸ transitionNextBelt(): void

Returns ​

void

Defined in ​

CustomBelt.ts:813

Released under the MIT License.