When opening/reopening VisB visualisations multiple old visualisations remain active

Description

It seems that old VisB visualisations still keep running when changing modle, project or reloading a visualisation. This can lead e.g. to multiple GSON error messages for the same file when reloading (e.g., I modified a JSON file and had a comma too much; I got an error message multiple times).
Also, mouse clicks could execute an event multiple times. This I have fixed by calling the JQuery off function before attaching a new click function.

Environment

None

Activity

Show:

Michael Leuschel October 12, 2020 at 12:21 PM

The issue due to the model not initialised messages seems to have been because sometimes (startVisualisation) the clearing was incomplete. This is fixed in 786050c6d9818b0a3df06260772b3671326a223f.

Michael Leuschel October 12, 2020 at 12:19 PM
Edited

This seems to be due to using

$(document).ready(function(){

to register click functions. Old click functions are added again when loading another visualisation.

Simply removing the document.ready construct seems to solve the issue. (See also https://modernweb.com/5-things-stop-jquery/).

Fixed

Details

Assignee

Reporter

Priority

Created October 11, 2020 at 7:35 AM
Updated October 12, 2020 at 12:23 PM
Resolved October 12, 2020 at 12:23 PM