Cleanup visualization after editor closes

Otherwise there is an error when opening again.

Signed-off-by: Maximilian Krög <maxi_kroeg@web.de>
This commit is contained in:
Maximilian Krög 2025-07-26 01:35:55 +02:00
parent bf125dd99c
commit 0cb4869e38
No known key found for this signature in database
GPG Key ID: 3C00897BB53AAB9C

View File

@ -300,10 +300,9 @@ function loadGISEditor (value, field, type, inputName) {
return;
}
disposeGISEditorVisualization();
$gisEditorModal.find('.modal-title').first().html(data.gis_editor_title);
$gisEditorModal.find('.modal-body').first().html(data.gis_editor);
$gisEditorModal.on('hidden.bs.modal', disposeGISEditorVisualization);
initGISEditorVisualization(
JSON.parse($('#visualization-placeholder').attr('data-ol-data')),
);