diff --git a/src/index.js b/src/index.js index a195c05..934082f 100644 --- a/src/index.js +++ b/src/index.js @@ -155,6 +155,13 @@ export default class Driver { return; } + this.refresh(); + } + + /** + * Refreshes and repositions the popover and the overlay + */ + refresh() { this.overlay.refresh(); } diff --git a/types/index.d.ts b/types/index.d.ts index 4d9de47..b49207a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -69,6 +69,11 @@ declare module 'driver.js' { */ private onResize(): void; + /** + * Refreshes and repositions the popover and the overlay + */ + private refresh(): void; + /** * Makes it operable with keyboard * @param {Event} e