Skip to content

Commit cdb1aa5

Browse files
authored
Merge pull request #82 from patdunlavey/ISLANDORA-2060
Islandora 2060
2 parents 519bb27 + b368842 commit cdb1aa5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

js/islandora_openseadragon.js

100644100755
+8-5
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
});
2727
}
2828
},
29-
detach: function() {
30-
$(base).removeClass('islandoraOpenSeadragonViewer-processed');
31-
$(base).removeData();
32-
$(base).off();
33-
delete Drupal.IslandoraOpenSeadragonViewer[base];
29+
detach: function(context) {
30+
// Only detach if triggered by Openseadragon viewer.
31+
if ($(context).is($(base))) {
32+
$(base).removeClass('islandoraOpenSeadragonViewer-processed');
33+
$(base).removeData();
34+
$(base).off();
35+
delete Drupal.IslandoraOpenSeadragonViewer[base];
36+
}
3437
}
3538
};
3639

0 commit comments

Comments
 (0)