Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-2060

AJAX call on page with Openseadragon Viewer causes viewer to duplicate itself.

    Details

      Description

      When I load content via an ajax call on a page that has an Openseadragon viewer, the viewer replicates itself inside the `#islandora-openseadragon` div.

      ## What I see happening:
      The Drupal.behaviors.islandoraOpenSeadragon:detach function is being called during the ajax call, and that this function disabling but not removing the viewer. It also removes Drupal.IslandoraOpenSeadragonViewer[base].

      After the detach event is done, a new attach event is triggered. When the attach function is called, it sees that there is no `Drupal.IslandoraOpenSeadragonViewer[base]`, so it adds a new one, thus duplicating the viewer.

      ## Desired outcome
      Ajax calls within a page displaying an openseadragon viewer should not cause the viewer to be duplicated.

        Attachments

          Activity

            People

            • Assignee:
              patdunlavey Patrick Dunlavey
              Reporter:
              patdunlavey Patrick Dunlavey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: