Skip to content

Commit

Permalink
Merge pull request #274 from AtlasOfLivingAustralia/feature/issue273
Browse files Browse the repository at this point in the history
Support promises for map selectable features #273
  • Loading branch information
salomon-j authored Feb 7, 2025
2 parents 5e4716b + 075a9de commit 7194d18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grails-app/assets/javascripts/feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ ecodata.forms.maps.featureMap = function (options) {
self.editableSitesHeading = options.editableSitesHeading || 'Site/s for this service';
self.categories = ko.observableArray();
if (options.selectableFeatures) {
self.selectableFeatures = options.selectableFeatures;
self.configureSelectionLayer(self.selectableFeatures);
Promise.resolve(options.selectableFeatures).then(function(features) {
self.selectableFeatures = features;
self.configureSelectionLayer(self.selectableFeatures);
});
}

self.drawnItems.on({
Expand Down

0 comments on commit 7194d18

Please sign in to comment.