sinabio / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

Enhancement for createBandInfo #371

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is not a defect just an enhancement request.

I was wondering if syncWith and highlight can be added to createBandInfo.  
I feel it will make the initialization code look a little bit cleaner and 
be less confusing to first time users than something like this:

...

var yearBand  = $wnd.Timeline.createBandInfo(
{
  eventSource    : eventSource,
  intervalPixels : 150,
  ...
  width          : "8%" 
} );

var bandInfos = [ dayBand, yearBand ];

bandInfos[1].syncWith  = 0;
bandInfos[1].highlight = true;

Modifications to Timeline.createBandInfo:
//add to the return object
highlight : ("highlight" in params) ? params.highlight : false,
syncWith  : ("syncWith"  in params) ? params.syncWith  : null,

Modifications to Timeline._Impl.prototype._initialize:
//change
//  if ("syncWith" in bandInfo) {
    if ("syncWith" in bandInfo && bandInfo.syncWith != null) {

Thanks,
Pat

Original issue reported on code.google.com by tucker...@gmail.com on 20 May 2010 at 1:10

GoogleCodeExporter commented 9 years ago

Original comment by ryan...@csail.mit.edu on 23 Jun 2011 at 10:22