Skip to content
Snippets Groups Projects

feat(plugins): data overlays (MIN-222)

Merged mateusz-winiarczyk requested to merge MIN-222-data-overlays into development
1 file
+ 30
0
Compare changes
  • Side-by-side
  • Inline
+ 30
0
@@ -39,3 +39,33 @@ To hide an overlay, plugins can use the `hideDataOverlay` method defined in `win
```javascript
window.minerva.overlays.hideDataOverlay(109);
```
#### Add an overlay
To add an overlay, plugins can use the `addDataOverlay` method defined in `window.minerva.overlays`. This method takes one argument: the object with the following properties:
- name (string): The name of the overlay.
- description (optional string): A description of the overlay.
- filename (optional string): The filename of the overlay data.
- fileContent (string or text File): The content of the overlay data.
- type (optional string): The type of overlay data.
##### Example of addDataOverlay usage:
```javascript
window.minerva.overlays.addDataOverlay(109);
```
#### Remove an overlay
To remove an overlay, plugins can use the `removeDataOverlay` method defined in `window.minerva.overlays`. This method takes one argument: the ID of the overlay that the plugin wants to remove.
##### Example of removeDataOverlay usage:
```javascript
window.minerva.overlays.removeDataOverlay(129);
```
Loading