rodrigueswilson / timemap

Automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

Clean up options cascade #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now there's an awful lot of code that looks like this:

openFunction = options.openInfoWindow || dopts.openInfoWindow || 
tmopts.openInfoWindow || false;

I'd much rather have something like this at the beginning of the constructor 
(where options is an argument):

TimeMap.mergeOptions(options, dopts, tmopts, TimeMap.defaults);

and never have to manage the cascade again. Might save some space, hopefully 
would keep me from having to code the cascade from scratch every time I want 
to add a new cascading option.

Original issue reported on code.google.com by nick.rab...@gmail.com on 31 Aug 2009 at 8:48

GoogleCodeExporter commented 9 years ago
Now in trunk via TimeMap.util.merge()

Original comment by nick.rab...@gmail.com on 14 Sep 2009 at 5:48