Browse Source

Fixed hotspot tooltip centering.

pull/8/head
Matthew Petroff 10 years ago
parent
commit
20b33394c6
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/js/pannellum.js

+ 2
- 2
src/js/pannellum.js View File

@@ -497,8 +497,8 @@ function createHotSpots() {
}
span.innerHTML = hs.text;
div.appendChild(span);
span.style.width = span.scrollWidth - 20 + 'px';
span.style.marginLeft = -(span.scrollWidth - 20) / 2 + 'px';
span.style.width = span.scrollWidth - 26 + 'px';
span.style.marginLeft = -(span.scrollWidth - 26) / 2 + 'px';
span.style.marginTop = -span.scrollHeight - 12 + 'px';
hs.div = div;
});


Loading…
Cancel
Save