Related Previews¶
Info
This plugin is an evolution of indoor
plugin. It can creates and tracks multiple previews,
for related views, not just "indoor"
related view.
This plugin tracks related plugin for an related views. If the tracked related views exist, it creates an interface elements with the preview of that related view. If the related view is loaded, the preview will change to go back to the original view.
- Plugin name:
"related_previews"
- Plugin namespace:
"related_previews"
Dependencies¶
This plugin has the following dependencies (they will be downloaded automatically):
- related plugin.
Loading the plugin¶
If this plugin is loaded, the module will have the following additional features:
Callbacks¶
This plugin adds the following new callback triggers, additionally to the default ones:
click_related_preview
: Will be called when the user clicks the related preview. The first parameter will be a default callback object with an additional property calledrelated_previews
with the following content:venue_id
(string): venue id of the related view.view_id
(string): view id of the related view.
Methods¶
generateRelatedPreview¶
It starts tracking related previews with the input id. If it exist, it will be displayed.
Input:
id
(string): Related view id to be tracked and to generate interface.
getTrackedPreviewIds¶
Returns a list with all tracked related ids.
Output:
related_previews
(string[]): list of ids being tracked with generateRelatedPreview.
showPreview¶
Shows the preview with the input id, if it exists.
id
(string): Related view id to show its interface.
hidePreview¶
Hides the preview with the input id, if it exists.
id
(string): Related view id to be hide its interface.
showTitle¶
Shows the title of the preview with the input id, if it exists.
id
(string): Related view id to show its title.
hideTitle¶
Hides the title of the preview with the input id, if it exists.
id
(string): Related view id to hide its interface.
Flags¶
enabled¶
enables or disables the related previews.