Hi Greg,

I just did a check of the code, and it looks to me like each event's painter 
has its theme set from the band's theme, as you'd expect.

See: 
File: timeline.js
Timeline.createBandInfo = function(params) {
Lines:
   // get theme from the band info or use default
    var theme = ("theme" in params) ? params.theme : 
Timeline.getDefaultTheme(); 
    var eventPainterParams = {
        theme:      theme
    };
  eventPainter = new Timeline.OriginalEventPainter(eventPainterParams);

And then
File: original-painter.js
Function: Timeline.OriginalEventPainter.prototype.paint = function() {
Lines:
  // use the theme when painting the event
            this.paintEvent(evt, metrics, this._params.theme, 
highlightMatcher(evt));

To further chase the problem you're having, I suggest that you
build a test case: create another test example, similar to 
http://simile-widgets.googlecode.com/svn/timeline/trunk/src/webapp/examples/test_example/

but with two bands and use different themes to demonstrate the problem.

Then post your example so others can have a look at it.

Regards and good luck,

Larry



----- Original Message ----
From: greg <[EMAIL PROTECTED]>
To: SIMILE Widgets <[email protected]>
Sent: Thursday, October 23, 2008 7:45:00 AM
Subject: Re: Timeline Themes


Thanks Larry:

I also "fixed" the problem by making sure that the tape height as
specified in the theme was used to build the "style" attribute in the
DIV I used in the example:

var O=this._timeline.getDocument().createElement("div");
O.className="timeline-event-tape";
O.style.left=D+"px";
O.style.width=F+"px";
O.style.top=L+"px";
O.style.height=E+"px"; // added by GCT 21-Oct-2008

where O is the DIV which will become the tape. This results in the
following code:

<div class="timeline-event-tape" style="left: 3148px; width:
205px;top: 0.5px;height:10; background-color: green; opacity: 1;"/>

One more question: It seems that although I can specify two different
themes (one for each BandInfo), only one is used. I was trying to make
the tapes in the bottom band thinner than the ones in the top band
(like some of the older demos). Is it possible to do this?

Thanks again for all you help
Greg



On Oct 22, 10:02 pm, LarryK <[EMAIL PROTECTED]> wrote:
> Hi Greg,
>
> It appears that someone changed things so that tape.height was defined
> (to some extent) in both css and by the theme:
>
> The tape height on the screen was defined purely by css. But the tape
> height from the theme was still being used (to some extent) in the sw.
> In particular, the Theme's tape height is returned by function
> _paintEventTape in file original-painter. Bottom line: I undid the
> (partial) switch to css. Now the tape height is set by the Theme.
>
> In addition, the easiest way to change the theme is now demonstrated
> in the test Timeline example. 
> See:http://simile-widgets.googlecode.com/svn/timeline/trunk/src/webapp/ex...
>
> Note that the tape height fix is only in the trunk version at this
> point. It is planned for the next release.
> You can download it now 
> fromhttp://simile-widgets.googlecode.com/svn/timeline/trunk/timeline_libr...
> orhttp://simile-widgets.googlecode.com/svn/timeline/trunk/timeline_sour...
>
> Re overriding the css rule. You should be able to do that, depending
> on the placement of your replacement rule in the css file load order.
> But with this change, that's obviated.
>
> Hope this helps,
>
> Larry
>
> On Oct 21, 6:40 pm, greg <[EMAIL PROTECTED]> wrote:
>
> > Hi Larry:
>
> > I have analyzed the tape visual( its DIV) via the "Inspect Element"
> > feature of FireBug. Here is the result:
>
> > <div class="timeline-event-tape" style="left: 3148px; width: 205px;
> > top: 0.5px; background-color: green; opacity: 1;"/>
>
> > I saw the code where the tape height is set by the theme, but as you
> > can see the height is not in this DIV. The class:
>
> > .timeline-event-tape {height:4px;}
>
> > does contain the height but it is not overridden by the style that
> > follows it. Am I on the right track (no pun intended)?
>
> > Thanks
>
> > On Oct 20, 10:38 am, LarryK <[EMAIL PROTECTED]> wrote:
>
> > > Hi Greg,
>
> > > Themes should work but...
> > > a) a number of people have said that the current instructions for
> > > creating a 
> > > themehttp://code.google.com/p/simile-widgets/wiki/Timeline_CreatingNewThemes
> > > doesn't work. There is a comment there from danielbragion with updated
> > > information.
>
> > > ==>> Your help in testing Daniel's instructions would be appreciated.
> > > Send your step by step instructions to this list and we can update the
> > > wiki.
> > > IMHO, the best example would be to create a new theme, "MyNewTheme" so
> > > you can show how to have Timeline use it instead of the default.
>
> > > b) Yes, the Theme should be used by Timeline. 
> > > Eghttp://code.google.com/p/simile-widgets/source/browse/timeline/trunk/...
> > > on line 414 appears to use the Theme to set the tape height.
> > > And function Timeline.OriginalEventPainter.prototype.paint (line 58 of
> > > the same file), uses the Theme for computing the metrics object. The
> > > metrics and theme object are then passed to every event's painter.
>
> > > So if your changes to the theme are not taking effect, my guess is
> > > that your new theme is not yet being used.
>
> > > Good luck and please document your steps for the next person.
>
> > > Regards,
>
> > > Larry
> > > ps. Please start a new post thread if you're changing subjects. It
> > > makes it easier for others to find the posts that are most relevant to
> > > their situations.
>
> > > On Oct 19, 9:27 pm, greg <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Larry:
>
> > > > Between the time I posted this question and now I have come to learn
> > > > that the "color" and "textColor" attributes are the way to make this
> > > > happen. Thanks again for your reply. BTW, are themes fully supported?
> > > > I was able to use one of my own (after seeing a post here) . It seems
> > > > to be fully integrated in the resulting code but nothing seems to
> > > > reflect this on the screen(specifically tape width) Thanks again in
> > > > advance.
>
> > > > Greg

--~--~---------~--~----~------------~-------~--~----~
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