Overview

The Layout component arranges carousel elements by setting width, height, margin and padding according to the latest options.

Methods

listSize()

listSize(): number

Returns the list width for the horizontal carousel, or the height for the vertical carousel.


slideSize()

slideSize( index: number, withoutGap?: boolean ): number

Returns the slide width for the horizontal carousel, or the height for the vertical carousel.

Params

index
withoutGap

sliderSize()

sliderSize(): number

Returns the carousel size without clones before the first slide.


totalSize()

totalSize( index?: number, withoutGap?: boolean ): number

Returns the total width or height of slides from the head of the carousel to the specified index. This includes sizes of clones before the first slide.

Params

index
withoutGap

getPadding()

getPadding( right: boolean ): number

Returns the padding value.

Params

right