浏览代码

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 年前
父节点
当前提交
379dd04274
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/js/pannellum.js

+ 2
- 2
src/js/pannellum.js 查看文件

@@ -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 /


正在加载...
取消
保存