Jeff,
I've used the following code. You can define the styles in CSS, or via JS (my
original code required some dynamic stuff):
var ct = tl.getDocument().createElement("div");
ct.id = "centerTime";
ct.style.width = "1px";
ct.style.height = "100%";
ct.style.backgroundColor = "#ff0000";
ct.style.position = "absolute";
ct.style.opacity = 0.66;
ct.style.left = (tl.getPixelLength()/2) + "px";
ct.style.zIndex = "5000";
tl.addDiv(ct);
Things on the timeline aren't positioned using margin-left (like you have in
your CSS) but rather as absolutely computed left positions, based on the size
of the timeline and the band div's inside. That's why the left property needs
to be set at runtime, and not in the stylesheet.
--Mike
On Jul 23, 2012, at 2:58 PM, jroehl wrote:
> The following remains stationary on any timeline:
>
> <img
> src="http://www.simile-widgets.org/timeline/api/images/copyright-vertical.png"
> class="timeline-copyright" title="Timeline copyright SIMILE -
> www.code.google.com/p/simile-widgets/">
>
> I would like to place a stationary object on my timeline. I would like to
> place a line on the timelines centerdate using getCenterVisibleDate(). I
> would like to do this externally, without changeing the javascript
> source-code for times-lines.
>
> I tried the following, in CSS, but it is not accurate:
>
> .sync {
> background-attachment: scroll;
> background-clip: border-box;
> background-color: red;
> background-image: none;
> background-origin: padding-box;
> background-position: 0 0;
> background-repeat: repeat;
> background-size: auto auto;
> display: block;
> height: 100%;
> margin-left: 49%;
> opacity: 0.2;
> position: absolute;
> width: 3px;
> z-index: 5000;
> }
>
> Is there a better way of doing this?
>
> Thanks
> Jeff Roehl
--
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.