...
The ThumbnailCreate component should be used whenever a slide is saved. It does not matter, whether a slide is new or old or in draft mode or published. Each thumbnail is saved by its slide id. Slide id is supposed to be unique across all slides in the platform. The syntax of the ThumbnailCreate is as follows:
<ThumbnailCreate slideId={...} slideTitle={...} slideContent={...}
createNewaction={...} />
Component properties:
slideId: Ideally, it should be slide id along with its version number, e.g., 16-1.
...
slideContent: As it is retrieved from deckservice, without removing HTML contained in it.
createNew: Boolean. Either true or falseaction: new|update|skip. The value new will create new thumbnail only if it doesn't already exist. The value update will update the thumbnail (i.e., recreate) even if it already exists. The value skip will not take any action. The skip value is useful if you do not want to disturb a thumbnail irrespective of whether it already exists or not.
All properties are required.
...
The ThumbnailShow component should be used when you want to show a thumbnail. The syntax of the ThumbnailShow is as follows:
<ThumbnailShow slideId={...} slideTitle={...} slideContent={...} createNew={...} />
Some of the properties of this component are optional.
...
slideId: Slide id along with its version number (recommended), e.g., 16-1. You can use the slide id without version number as well if you have way to get the same format back.
slideTitle (optional if action='skip')
: As it is retrieved from deckservice, without removing associated HTML fragmentfragments. This is not required if createNew action is set to falseskip.
slideContent (
optionaloptional if action='skip')
: As it is retrieved from deckservice, without removing HTML contained in it. This is not required if createNewaction is set to falseskip.createNew: Boolean. Either true or false
action: new|update|skip . The value new will create new thumbnail as well only if it doesn't already exist. The value update will update the thumbnail (i.e., recreate) even if it already exists. The value skip will not take any action. By setting action to skip, you can avoid providing values for slideTitle and slideContent .
slideId and createNew action are mandatory. If createNew is action is set to true skip then slideTitle and slideContent are not required.
...
The ThumbnailOptions component provides some options for ThumbnailCreate and ThumbnailShow. Where should a new thumnail should be saved thumbnail save, is mentioned in this component. Also the size of the resulting image. The CSS for scaling the thumbnail image is avoided, the idea is , that for different thumnail sizes the same thumnail thumbnail image should be scaled down in different dimensions respective parent component using CSS.
Appendix A:
- For generating thumbnails of all the slides in a deck, iterate over slides slide data in a parent component and in each iteration call ThumbnailCreate component with required properties. It does not add any HTML that would disturb the markup of its parent component.
- For showing thumnailsthumbnails, iterate over slide ids in a parent component and in each iteration call ThumbnailShow component with its required parameters. You can ignore the optional properties if you set action property to skip.
- If you want to show thumbnails and in the process also want to ensure that a thumbnail is created if it doesn't already exist then iterate over slide data in a parent component and in each iteration call ThumbnailShow component. Remember, that you will need to provide all the properties (including optional) and set the action to new. Once the iteration is done, you might have to refresh your view panel to see the newly created thumbnails. The already existing thumbnails will show automatically.