Sorry... my problem was a missing closing bracket on timelineConfig, thanks
to Firebug.

David Huynh wrote:
Matt,

Have you tried this?
  http://simile.mit.edu/wiki/Exhibit/Timeline_View

David


Yes, I did try that and came up with the following (again, applied to the
nobelists.htm sample):

      <script type="text/javascript">
          function deceaseRowStyler(itemID, database, tr) { ... }

 var timelineConfig = {
      timelineConstructor:
           function ( div, eventSource ) {

                 div.style.height = "600px";

                 var bandInfos = [
                   Timeline.createBandInfo({
                     eventSource:    eventSource,
                     width:        "75%",
                     intervalUnit:   Timeline.DateTime.YEAR,
                     intervalPixels: 100,
                   })
                 ];

             var tl = Timeline.create( div, bandInfos, Timeline.HORIZONTAL);
             return tl;
           }
      </script>
[snip]

                      <div ex:role="exhibit-view"
                              ex:viewClass="Exhibit.TimelineView"
                              ex:configuration="timelineConfig"
                              ex:start=".nobel-year"
                              ex:marker=".discipline">
                       </div>

It does not seem to change the default template behavior of a dual banded
timeline. I cannot even change the div.style.height from timelineConfig.
I've made no other changes to the original example and it is not throwing
any exceptions or reporting errors.

Matt T wrote:
Hi,

I'm experimenting with Exhibit and Timeline and hope that someone can
point me in the right direction on scroll events.

Using the Timeline View in nobelists.html for example, is there a way
to register for scroll events on the bands? I saw in a prior thread
"Multiple timelines sync'd" where it is possible to do something like:

timeline1.getBand(0).addOnScrollListener(function(band) {...

how can I get a reference to a timeline created by an exhibit-view
template, such as in nobelists.html?

Are there any examples of how to use ex:configuration with a timeline
exhibit-view? Maybe this is where I can register for scroll events?

Are the exhibit-view templates created dynamically as facets are
selected or can they be configured from an onLoad handler?

Ultimately, I want to fire off my own javascript events as dates from
one of the timeline bands are scrolled into and out of  view,
enabling my subscribing application functions to update various dom
divs as dates pass by the window.

I spent quite a bit of time surfing the list archives and code, but no
joy, maybe I'm just sleepy.

Thanks...

-Matt
------------------------------------------------------------------------

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to