Merge pull request #699 from dvoracek-slub/fix-highlight-word
Quick Fix: Wait for `tx_dlf_viewer` when highlighting word
This commit is contained in:
commit
f7f2f0f69d
|
@ -259,7 +259,7 @@ function addImageHighlight(data) {
|
|||
data['documents'].forEach(function (element, i) {
|
||||
if(element['page'] === page) {
|
||||
if (element['highlight'].length > 0) {
|
||||
if(tx_dlf_viewer.map != null) {
|
||||
if (typeof tx_dlf_viewer !== 'undefined' && tx_dlf_viewer.map != null) { // eslint-disable-line camelcase
|
||||
tx_dlf_viewer.displayHighlightWord(encodeURIComponent(getHighlights(element['highlight'])));
|
||||
} else {
|
||||
setTimeout(addImageHighlight, 500, data);
|
||||
|
|
Loading…
Reference in New Issue