From f9c0720b81a2d14e1c5178f60785c7d1176645fb Mon Sep 17 00:00:00 2001 From: Campbell Date: Sun, 19 Feb 2017 13:34:22 -0500 Subject: [PATCH] Added support for language in title and text and ignored whitespace changes --- src/js/pannellum.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index e6bcd12..3979fd2 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -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':