Closed mtfurlan closed 7 years ago
Okay, it actually doesn't work, and in fact may break more things. Not sure how I missed that part. I may come back with another pull request if I do get it to work, but at this point probably not. Sorry for the bother.
I was running into a problem with really long digests, and instead of doing
angular.equals
onmarkers
which can have thousands of members, looking at oneversion
member or some other watch expression was quite useful.Added a setting in defaults called watch to allow for custom watch expressions.
defaults.watch.baselayers
defaults.watch.overlays
defaults.watch.markers
So for example, this is what I'm doing in my project:
I'm not sure
defaults
is the correct place for these, but putting them inmarkers
orlayers
didn't seem right either.I can write tests and an example, just wanted feedback on how I did this or if it's even wanted in the project first. I don't really know how the test or example naming scheme works though.
Would it be beneficial to try to replace
leafletScope.defaults
withleafletMapDefaults.getDefaults(mapId)
right before aleafletScope.$watch
?