Optionalcolumn_Determines which column configuration controls are populated in the viewer.
Corresponds to the data the plugin will recieve on save. Only
invoked when can_render_column_styles is true in the static
config.
Free any resources acquired by this plugin and prepare to be deleted.
Render this plugin using the provided View. While there is no
provision to cancel a render in progress per se, calling a method on
a View which has been deleted will throw an exception.
Static plugin configuration. Called exactly once per plugin at registration time and cached; the result must be stable for the lifetime of the application.
Like update(), but for when the dimensions of the plugin have changed
and the underlying data has not.
Restore this plugin to a state previously returned by save().
Notify the plugin that the style environment has changed. Useful for
plugins which read CSS styles via window.getComputedStyle().
The
IPerspectiveViewerPlugininterface defines the necessary API for a<perspective-viewer>plugin, which also must be anHTMLElementvia the Custom Elements API or otherwise. Rather than implement this API from scratch however, the simplest way is to inherit from<perspective-viewer-plugin>, which implementsIPerspectiveViewerPluginwith non-offensive default implementations, where only thedraw()andget_static_config()methods need be overridden to get started with a simple plugin.Note that plugins are frozen once a
<perspective-viewer>has been instantiated, so generally new plugin code must be executed at the module level (if packaged as a library), or during application init to ensure global availability of a plugin.Example
No Inherit Doc