Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] re-introduce search for coordinates in ol.Feature Array #1434

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fschoelzel
Copy link
Contributor

Rewrite displayHighlightWord to represent overwritable forward-function to utility.js
fixes: slub#20

Rewrite displayHighlightWord to represent overwritable forward-function to utility.js
* @see dlfUtils.searchFeatureCollectionForWords
*/
dlfViewer.prototype.searchFeatures = function(stringFeatures, value) {
return dlfUtils.searchFeatureCollectionForWords(stringFeatures, value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is not in this case the function searchFeatureCollectionForCoordinates unused? Or is the ddb-zeitunsportal using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in this case I override searchFeatures() in ddb-zeitunsportal with searchFeatureCollectionForCoordinates()
So i don't have to override and maintain the whole displayHighlightWord() function.

.done(function (fulltextData, fulltextDataImageTwo) {
var stringFeatures = [];
.done((fulltextData, fulltextDataImageTwo) => {
const stringFeatures = [];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can stringFeatures be changed in line Array.prototype.push.apply(stringFeatures, data.getStringFeatures()); after they have been defined as const here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the push() method will work in this case. It still can change the content of the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] re-searching for a word fails highlighting on trarget page
2 participants