Browse Source

Added support for language in title and text and ignored whitespace changes

pull/345/head
Campbell 7 years ago
parent
commit
f9c0720b81
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      src/js/pannellum.js

+ 10
- 0
src/js/pannellum.js View File

@@ -1592,6 +1592,11 @@ function createHotSpot(hs) {
var span = document.createElement('span');
if (hs.text)
span.innerHTML = escapeHTML(hs.text);
if(config.hasOwnProperty('language')){
if(hs.hasOwnProperty('text_' + config['language'])){
span.innerHTML = escapeHTML(hs['text_' + config['language']]);
}
}

var a;
if (hs.video) {
@@ -1849,6 +1854,11 @@ function processOptions(isPreview) {
case 'title':
infoDisplay.title.innerHTML = escapeHTML(config[key]);
infoDisplay.container.style.display = 'inline';
if(config.hasOwnProperty('language')){
if(config.hasOwnProperty('title_' + config['language'])){
infoDisplay.title.innerHTML = escapeHTML(config['title_' + config['language']]);
}
}
break;
case 'author':


Loading…
Cancel
Save