Pārlūkot izejas kodu

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

pull/345/head
Campbell pirms 7 gadiem
vecāks
revīzija
f9c0720b81
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. +10
    -0
      src/js/pannellum.js

+ 10
- 0
src/js/pannellum.js Parādīt failu

@@ -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':


Notiek ielāde…
Atcelt
Saglabāt