Home > widget-integration > ProductSwatchService
ProductSwatchService class
Signature:
export declare class ProductSwatchService
Constructors
Properties
Methods
|
Method
|
Modifiers
|
Description
|
|---|
|
addTooltipScrollHandler(tooltipContent)
|
protected
|
|
|
applyColorImageSwatch(label, swatchObj)
|
protected
|
|
|
applyColorToSwatch(label, colorCodes)
|
protected
|
|
|
applyProductImageSwatch(label, swatchObj)
|
protected
|
|
|
applySingleSwatchSetting(label, tooltip, swatchBy, swatchObj)
|
protected
|
|
|
applySwatchSettings(container, optionsWithValues, swatchSettings)
|
|
|
|
applyTextSwatch(label, tooltip, swatchObj)
|
protected
|
|
|
buildVariantTitleFromSelectedSwatches(container)
|
|
|
|
clearSelectedLabel(swatch)
|
|
|
|
findVariantByTitle(variants, title)
|
|
|
|
findVariantImage(optionsWithValues, swatchType, swatchValue, images)
|
|
|
|
getEnabledSwatches()
|
|
|
|
getSwatchOptionTitle(label)
|
|
|
|
handleSwatchOptionEvent(params)
|
protected
|
|
|
initProductSwatchEvents(productItem)
|
|
|
|
initTooltipScrollHandler(container)
|
|
|
|
isBackgroundImageEmpty(label)
|
protected
|
|
|
parseProductData(productItem)
|
protected
|
|
|
registerMouseLeaveHandler(swatch, productItem, defaultImages)
|
protected
|
|
|
registerSwatchOptionEvent(eventType, productItem, swatch, option, optionsWithValues, images, defaultImages)
|
protected
|
|
|
setProductImage(productItem, images, position)
|
protected
|
|
|
setProductImageToDefault(productItem, images)
|
protected
|
|
|
setSelectedLabel(swatch, option)
|
|
|