Here is how to get 3 timelines (TEOI81A2X, VOY3K0LEW and MFBN61A2X) to scroll 
center dates with each other.


Unfortunately, after testing it, it seems to "go off" on its accuracy after 
doing a bit of scrolling.

Is there a more accurate way of doing this?


TEOI81A2X.getBand(0).removeOnScrollListener();

TEOI81A2X.getBand(0).addOnScrollListener(function(band) {
var centerDateVOY3K0LEW = band.getCenterVisibleDate();
VOY3K0LEW.getBand(0).setCenterVisibleDate(centerDateVOY3K0LEW);
});

VOY3K0LEW.getBand(0).removeOnScrollListener();

VOY3K0LEW.getBand(0).addOnScrollListener(function(band) {
var centerDateECZQB1A2X = band.getCenterVisibleDate();
ECZQB1A2X.getBand(0).setCenterVisibleDate(centerDateECZQB1A2X);
});

ECZQB1A2X.getBand(0).removeOnScrollListener();

ECZQB1A2X.getBand(0).addOnScrollListener(function(band) {
var centerDateMFBN61A2X = band.getCenterVisibleDate();
MFBN61A2X.getBand(0).setCenterVisibleDate(centerDateMFBN61A2X);
});

MFBN61A2X.getBand(0).removeOnScrollListener();

MFBN61A2X.getBand(0).addOnScrollListener(function(band) {
var centerDateTEOI81A2X = band.getCenterVisibleDate();
TEOI81A2X.getBand(0).setCenterVisibleDate(centerDateTEOI81A2X);
});



 
Thanks 
Jeff Roehl
[email protected]
(818) 912-7530


>________________________________
> From: kasaba <[email protected]>
>To: SIMILE Widgets <[email protected]> 
>Sent: Monday, March 5, 2012 1:10 AM
>Subject: [Simile-Widgets] How to set new timeline center date, when filtering 
>is done?
> 
>Hi, fellows
>
>I want to write logic like that:
>
>when filtering is done
>var date =  smallest date +  (greatest date - smallest date)/2
>
>and  then to set that date as center date in timeline.
>
>Thanks in advance.
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"SIMILE Widgets" group.
>To post to this group, send email to [email protected].
>To unsubscribe from this group, send email to 
>[email protected].
>For more options, visit this group at 
>http://groups.google.com/group/simile-widgets?hl=en.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to