From 5bb2e4e504470b970492cece111136ff338b010a Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 10 Sep 2024 13:26:45 +0200 Subject: [PATCH] doc: update --- docs/guide/components/tooltip.md | 4 ++++ docs/plugins/index.md | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/guide/components/tooltip.md b/docs/guide/components/tooltip.md index 09fa5166a..99e5451e1 100644 --- a/docs/guide/components/tooltip.md +++ b/docs/guide/components/tooltip.md @@ -39,6 +39,10 @@ Create a tooltip. Updates the position of the tooltip, the parameters are the same `top`, `left` and `position` as above. +### `tooltip.update(content)` + +Updates the content of the tooltip. + ### `tooltip.hide()` Hide and destroy the tooltip. diff --git a/docs/plugins/index.md b/docs/plugins/index.md index 4877043c0..d1e92524a 100644 --- a/docs/plugins/index.md +++ b/docs/plugins/index.md @@ -82,6 +82,22 @@ const viewer = new Viewer({ }); ``` +::: tip +When using Typescript you can also type-check the configuration object : + +```ts +import { MarkersPlugin, MarkersPluginConfig } from '@photo-sphere-viewer/markers-plugin'; + +const viewer = new Viewer({ + plugins: [ + [MarkersPlugin, { + markers, + } satisfies MarkersPluginConfig], + ], +}); +``` +::: + After initialization the plugin instance can be obtained with the `getPlugin` method, allowing to call methods on the plugin and subscribe to events. ```js