-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: main
Are you sure you want to change the base?
[BUGFIX] re-introduce search for coordinates in ol.Feature Array #1434
Conversation
Rewrite displayHighlightWord to represent overwritable forward-function to utility.js
* @see dlfUtils.searchFeatureCollectionForWords | ||
*/ | ||
dlfViewer.prototype.searchFeatures = function(stringFeatures, value) { | ||
return dlfUtils.searchFeatureCollectionForWords(stringFeatures, value); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 = []; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Rewrite displayHighlightWord to represent overwritable forward-function to utility.js
fixes: slub#20