Ver código fonte

Check to make sure hot spot div exists before deleting it (#702).

pull/707/head
Matthew Petroff 5 anos atrás
pai
commit
19b020dbc7
1 arquivos alterados com 5 adições e 3 exclusões
  1. +5
    -3
      src/js/pannellum.js

+ 5
- 3
src/js/pannellum.js Ver arquivo

@@ -1784,10 +1784,12 @@ function destroyHotSpots() {
if (hs) {
for (var i = 0; i < hs.length; i++) {
var current = hs[i].div;
while(current.parentNode != renderContainer) {
current = current.parentNode;
if (current) {
while(current.parentNode != renderContainer) {
current = current.parentNode;
}
renderContainer.removeChild(current);
}
renderContainer.removeChild(current);
delete hs[i].div;
}
}


Carregando…
Cancelar
Salvar