Update viewer.addOverlay doc

Mention the preserveOverlays option
This commit is contained in:
Benny Lichtner 2025-01-30 14:45:30 +01:00 committed by GitHub
parent ced1bde338
commit 337af91373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2222,8 +2222,9 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/**
* Adds an html element as an overlay to the current viewport. Useful for
* highlighting words or areas of interest on an image or other zoomable
* interface. The overlays added via this method are removed when the viewport
* is closed which include when changing page.
* interface. Unless the viewer has been configured with the preserveOverlays
* option, overlays added via this method are removed when the viewport
* is closed (including in sequence mode when changing page).
* @method
* @param {Element|String|Object} element - A reference to an element or an id for
* the element which will be overlaid. Or an Object specifying the configuration for the overlay.