Closed jgravois closed 6 years ago
agreed... I added these early on, before I had a handle on how this would be structured. I'll see if they can be part of the module
i took a look at this this afternoon, the bulk of the references to 'Window' occur within the _map
call inside drawGeoService
.
it seems like the most best thing to do would be to pass the appropriate context through there as the third parameter, but this didn't work the way i hoped.
var app = {
knownObjectIds: {}
};
// ...
_.map(geojson.features || [], function(d) {
// app.knownObjectIds etc.
}, app);
nice work @mapmeld!
this is just a code smell thing.
modules/svg/geoservice.js#L17-L24
it'd be preferable to wrap these arrays and objects as module level globals instead of attaching them directly to
window
.