Przeglądaj źródła

Moving from visibility to display due to Chrome bug

If you animate the hotspot (which is not the default case for pannellum, but which it could be) with an infinite CSS keyFrame animation, `vissibility:hidden` has an error in Chrome, as I described here: http://stackoverflow.com/questions/30167467/css-infinite-animation-after-hidden-is-not-resetted-chrome
pull/74/head
Didac 9 lat temu
rodzic
commit
379dd04274
1 zmienionych plików z 2 dodań i 2 usunięć
  1. +2
    -2
      src/js/pannellum.js

+ 2
- 2
src/js/pannellum.js Wyświetl plik

@@ -1072,9 +1072,9 @@ function renderHotSpots() {
var z = hsPitchSin * configPitchSin + hsPitchCos * yawCos * configPitchCos;
if ((hs.yaw <= 90 && hs.yaw > -90 && z <= 0) ||
((hs.yaw > 90 || hs.yaw <= -90) && z <= 0)) {
hs.div.style.visibility = 'hidden';
hs.div.style.display = 'none';
} else {
hs.div.style.visibility = 'visible';
hs.div.style.display = 'block';
// Subpixel rendering doesn't work in Firefox
// https://bugzilla.mozilla.org/show_bug.cgi?id=739176
var transform = 'translate(' + (-renderer.canvas.width /


Ładowanie…
Anuluj
Zapisz