Browse Source

Merge pull request #706 from albig/cherry-pick-699

Quick Fix: Wait for `tx_dlf_viewer` when highlighting word
3.3.x
Alexander Bigga 2 months ago
committed by GitHub
parent
commit
fd5a9f6a0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Resources/Public/Javascript/PageView/SearchInDocument.js

2
Resources/Public/Javascript/PageView/SearchInDocument.js

@ -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…
Cancel
Save