This component simplifies the development of the management controls when adding images. Typically used on the Control side of a plugin, it allows the app owner to add, edit and delete images.
This name space consists of one major class:
thumbnailwhich is the class that instantiates an image component typically used on the control side to add, edit and delete images
Class instance for image thumbnail. Typically used on the control side to add, edit and delete images.
For full example see https://github.com/BuildFire/textPlugin/blob/master/control/design/index.html
In your controller body create an html container element for thumbnail component
let thumbnail = new buildfire.components.images.thumbnail(selector, options);
Thumbnail class constructor method.
|string||no||Css selector of element that will contain the sortable list|
|string | object||no||Image url or options object|
If options is not string (image url) it can be an object with following properties
|string||yes||A string holds a background image URL to load|
|string||no||Label for the image|
|string||no||A label to show under the image to give the user indication about the optimal image size to upload|
Initializes the thumbnail component
|string||yes||Css selector of element that will contain the thumbnail component|
Loads an image into the component
|string||yes||Image url to be loaded into thumbnail component|
Removes the image from thumbnail component
An overridable handler that is called when the image is deleted
An overridable handler that is called when the image is changed