ng-scrollbars
ng-scrollbars copied to clipboard
Specific config kills general (default) config
I have some default config thus:
ScrollBarsProvider.defaults = {
...
, "mouseWheel": {
"scrollAmount": 100
, "preventDefault": true
...
}
...
}
Then in a specific instance I want to override "preventDefault": false
, but leave all of the other settings, such as "scrollAmount": 100
intact.
Your config merge routine in the render
function seems to intelligently merge config in the way I want, but only at the "top" level of the config object. Nested "general" objects are just replaced whole by the "specific" objects. Eg scrollAmount
in the above example is killed.
Couldn't you just use an angular.merge
in render? I note that it has been just freshly deprecated in 1.6.5, but as they say, angular.merge
"will not be removed in the 1.x lifecycle".
Thanks!