Your listener id (must be unique for all project events)
Your listener function
// Each time the current active project will be deactivated it will display the project id in the console
JMap.Event.Project.on.preDeactivation(
"custom-project-pre-deactivation",
params => console.log(`Project id="${params.project.id}" will be deactivate`)
)
JMap.Event.Project.on.preDeactivation
This event is triggered when current active project will be deactived.
When this event is triggered, the project is still loaded (the map, the redux state, etc...).
You can do anything normally.