Skip to content

Commit

Permalink
CADENZA-36754 Add the 'reload' CadenzaEventType introduced in the tic…
Browse files Browse the repository at this point in the history
…ket and describe it (#54)

* CADENZA-36754 Add the 'reload' CadenzaEventType introduced in the ticket and describe it

* CADENZA-36754 Fill the changelog in the same way as is was done when adding new events before

(cherry picked from commit 63a5070cb7a8e304374ffdac0f42b980b774d9d5)

---------

Co-authored-by: schmidt <[email protected]>
  • Loading branch information
klschm and schmidt authored Oct 24, 2024
1 parent d1da50f commit fa74229
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project uses a version scheme based on the Cadenza main version in the format x.x.y, where x.x is the Cadenza main version and y a functional change or bugfix.

## Unreleased
### Added
- `CadenzaReloadEvent`

### Added
- `additionalLayers` option for `CadenzaClient#createGeometry` and `CadenzaClient#editGeometry`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/cadenza.js
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,7 @@ function array(/** @type unknown */ value) {
* | 'objectInfo'
* | 'selectObjects:ok'
* | 'selectObjects:cancel'
* | 'reload'
* } CadenzaEventType - An event type to subscribe to using {@link CadenzaClient#on}
*/

Expand All @@ -1379,6 +1380,7 @@ function array(/** @type unknown */ value) {
* : T extends 'objectInfo' ? CadenzaObjectInfoEvent
* : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent
* : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent
* : T extends 'reload' ? CadenzaReloadEvent
* : never
* } CadenzaEventByType
*/
Expand Down Expand Up @@ -1423,6 +1425,13 @@ function array(/** @type unknown */ value) {
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
*/
/** @typedef {CadenzaEvent<'selectObjects:cancel'>} CadenzaSelectObjectsCancelEvent - When the user cancelled the selection. */
/**
* @typedef {CadenzaEvent<'reload'>} CadenzaReloadEvent - When the user clicked on the 'reload' button in the embedding standby page
*
* If a user does not interact with the iframe displaying the Cadenza content for a while, a standby embed page is displayed
* and the user can click a reload button there. Then the application using Cadenza JS can re-trigger the loading of the iframe
* with the correct original URL and parameters and do what was originally done when displaying that iframe.
*/

export class AbortError extends DOMException {
constructor() {
Expand Down

0 comments on commit fa74229

Please sign in to comment.