PGJS91A2X.getBand(0).removeOnScrollListener();
PGJS91A2X.getBand(0).addOnScrollListener(function(band) {
var centerDateORJA91A2X = band.getCenterVisibleDate();
ORJA91A2X.getBand(0).setCenterVisibleDate(centerDateORJA91A2X);
});
ORJA91A2X.getBand(0).removeOnScrollListener();
ORJA91A2X.getBand(0).addOnScrollListener(function(band) {
var centerDateTEOI81A2X = band.getCenterVisibleDate();
TEOI81A2X.getBand(0).setCenterVisibleDate(centerDateTEOI81A2X);
});
TEOI81A2X.getBand(0).removeOnScrollListener();
TEOI81A2X.getBand(0).addOnScrollListener(function(band) {
var
centerDatePGJS91A2X = band.getCenterVisibleDate();
PGJS91A2X.getBand(0).setCenterVisibleDate(centerDatePGJS91A2X);
})
It seems that the visual center of the timeline object is not always the getCenterVisibleDate() for whatever reason.
My goal is to inscribe a thin red line through all 3 of these time-lines, so that if timeline #1 red line is placed on July 4th 1776 that timeline #2 red line will be exactly on July 4th 1776, regardless of
wether getCenterVisibleDate() is the exact visible center of the timeline, which sometimes it is not.
In other-words, getCenterVisibleDate() is not always 50% of the visible <div>.
So if I move one timeline to a certain date, I can scroll down to another timeline and see that the red line is exactly on the same date, regardless if it visually centered. The lines are on the same date but may not visually line up.
The
outcome of this is to be able to position one timeline at a point in history and be able to immediately see on another timeline what was going on at that exact date.
Would the following work? Notice I changed (tl.getPixelLength()/2) + "px"; with getCenterVisibleDate()