I have a custom media object that inherits from MediaData and IContentImage.
I have overridden the Thumbnail property to return a resized thumbnail image. However, ImageDescriptor does not support resizing based on the original image aspect ratio.
[ImageDescriptor(Width = 48, Height = 48)] public override Blob Thumbnail { get { return base.Thumbnail; } set { base.Thumbnail = value; } }
To work around this, I implemented a Dojo module that applies custom styling to the thumbnail image in the assets pane. In this module, I have hardcoded some components using CSS classes.
I have a custom media object that inherits from MediaData and IContentImage.
I have overridden the Thumbnail property to return a resized thumbnail image. However, ImageDescriptor does not support resizing based on the original image aspect ratio.
[ImageDescriptor(Width = 48, Height = 48)]
public override Blob Thumbnail
{
get
{
return base.Thumbnail;
}
set
{
base.Thumbnail = value;
}
}
To work around this, I implemented a Dojo module that applies custom styling to the thumbnail image in the assets pane. In this module, I have hardcoded some components using CSS classes.
const container = query(".epi-thumbnailContentList.dgrid")[0];
query(".epi-thumbnail")
I would like to know if this is the best approach. Hardcoding CSS classes might break my script if Optimizely releases changes to the assets pane UI.