Skip to content

VariantPreset Support

Compare
Choose a tag to compare
@mficzel mficzel released this 29 Oct 14:19

Provides a new property variantPreset in the AssetImageSource and
DummyImageSource Fusion prototypes. The expect a string giving the
preset identifier and preset variant name separated by ::, like:

Acme.Com:Component.Teaser.Hero::landscape

In addition this adds a new method useVariantPreset() to the
ImageSourceHelperInterface that can be used to specify a variant to
use based on a configured asset variant preset:

useVariantPreset('Acme.Com:Component.Teaser.Hero', 'landscape')

That variant (if existing) of an asset will be used as base before any
further adjustments are applied.

Furthermore this changes the API for using thumbnail presets:

  • renames applyPreset() to applyThumbnailPreset() in
    ImageSourceHelperInterface
  • renames preset to thumbnailPreset in Fusion prototypes

The key preset in Fusion is still used if thumbnailPreset is not
given to provide b/c.

Resolves #12