Re: [Simile-Widgets] Changing the order of event lines in Timeline

2014-01-10 Thread Michael Nosal
On Jan 10, 2014, at 2:40 PM, Larry Stice wrote: How do I change the order from top to bottom of event lines within a lane in Timeline? Where in the code does it decide what order to put them in? You'll want to look at the painter file you are using for your timeline. For example, if

Re: [Simile-Widgets] adding events in Timeline 2

2013-06-13 Thread Michael Nosal
It is quite simple to add events dynamically through Javascript. Create a new event, add it to the eventSource for the band(s) and update the timeline: var evt = new Timeline.DefaultEventSource.Event ({ start: new Date(May 03 2013 00:00:00 GMT-0600), instant : true, text : An

Re: [Simile-Widgets] Re: Set default position and range of timeline

2013-02-06 Thread Michael Nosal
You must use an actual javascript Date object, not a date string. Use Timeline.DateTime.parseGregorianDateTime(Jan 12 2013) or new Date(Jan 12 2013) You can center the timeline upon creation by specifying todays date when you create the bandInfos: var bandInfos = [

Re: [Simile-Widgets] Timeline events do not display??

2013-01-22 Thread Michael Nosal
The cause is most likely a simple javascript error, failure to properly fetch the source data file (if fetching your events via ajax) or malformed data (e.g. invalid json or xml, such as missing quotation mark, extraneous curly-brace or mismatching elements) Take a look at the Chrome debugger

Re: [Simile-Widgets] Re: How to create 1 and 2 digit years?

2012-11-13 Thread Michael Nosal
Time formats are a common problem to deal with. There are all kinds of problems dealing with ambiguities in non-standardized date formats, and many edge cases to consider. Browsers implement javascript date handlers in different ways. Most support RFC2822 / IETF date syntax: Mon, Dec 25 1995 or

Re: [Simile-Widgets] Dynamic Timeline visualization

2012-11-06 Thread Michael Nosal
On Aug 19, 2012, at 11:42 AM, lesm wrote: Does the SIMILE timeline support dynamic loading of new events without refreshing the entire widget such that I could make a call like: self.setInterval(readLatestJson, 3000); And the new event would show up in the timeline? Or better yet, if

Re: [Simile-Widgets] Multiple markers for a single band?

2012-11-06 Thread Michael Nosal
On Oct 27, 2012, at 4:27 AM, Arttu Laaksonen wrote: Hello, I have a timeline that is quite high (1600 pixels) and requires up-down scrolling. There are two bands, the overview at top (32 pixels) and the main band below which is 1568 pixels in height. The date markers are now shown only

Re: [Simile-Widgets] Detecting wether timelines has been loaded

2012-09-25 Thread Michael Nosal
if (window.Timeline === undefined) { console.log(Timeline not loaded) } else { console.log(Timeline.version = + Timeline.version) } On Sep 25, 2012, at 7:31 PM, Jeff Roehl wrote: In jQuery, I can detect whether jQuery has been loaded and what version is running with: if

Re: [Simile-Widgets] use a json loaded from desktop

2012-09-20 Thread Michael Nosal
Yes, you can refer to JSON stored in a static file. However, note that Google prevents AJAX calls to file:/// urls, so you'll need to put it where it can be served via http. --Mike On Sep 19, 2012, at 7:11 AM, Andrea Maestroni wrote: hi to all! i am a new user of SIMILE Widgets! i have

Re: [Simile-Widgets] autoWidth and dynamically adding hot zones

2012-09-16 Thread Michael Nosal
Most things in a Timeline can be added/changed dynamically, but I'm unsure what you are asking for. Do you want to adjust the scaling of a portion of the Timeline when events are being shown within that portion? Or do you want to adjust the scale to focus attention on a portion of the timeline

Re: [Simile-Widgets] How do I line up duration events to be at the same horizontal location as the next one, even if they overlap?

2012-09-14 Thread Michael Nosal
This isn't entirely correct. Timeline doesn't position events at 'random' and the vertical ordering of events depends both on the date of the event and the space required to display the event and it's label. You do not need to manipulate your JSON strings to set the order. By default,

Re: [Simile-Widgets] Layout of Duration events in Timeline

2012-09-14 Thread Michael Nosal
1) Tape thickness is determined by the theme. Look at api/scripts/themes.js - you can set the tape height (and you need to adjust the track height too). Putting the label inside the track requires customizing the Timeline.OriginalEventPainter.paintPreciseDurationEvent method. Basically, you just

Re: [Simile-Widgets] Add a custom fields to the datasource and retrieve them

2012-09-13 Thread Michael Nosal
Yes, you can do this. Timeline stores the original source objects for your events inside the event object. You can retrieve them by using evt.getProperty(attributeName) e.g. evt.getProperty(customfield_1) evt.getProperty(customfield_2) No processing is performed on the custom properties when

Re: [Simile-Widgets] Add arrows to move the timeline

2012-09-12 Thread Michael Nosal
You are correct. Use tl.getBand(0).setCenterVisibleDate() to move the timeline to a specific date. You need to pass in a javascript date object to setCenterVisibleDate(). For example, to have buttons that jump the timeline by one year +/- you could use: input type=button id=backInTime

Re: [Simile-Widgets] Timeline use Json service as data source

2012-09-12 Thread Michael Nosal
Using Timeline with JSON is quite easy to do. Timeline provides methods for reading data from a JSON source. You don't need to (and shouldn't have to) store your json output in a global variable. Set up your timeline then load your data: tl = Timeline.create(document.getElementById(tl),

Re: [Simile-Widgets] How to cut-off time in timeline-event-bubble-time

2012-08-02 Thread Michael Nosal
The Timeline default is to use Timeline.GregorianDateLabeller.labelPrecise. The painter calls showBubble when you click an event. This calls fillInfoBubble on the event. This calls fillTime on the event, which is what calls labelPrecise. To change this, make your own copy of the labelPrecise

Re: [Simile-Widgets] How to make an object remain stationary on a timeline

2012-07-23 Thread Michael Nosal
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%;

Re: [Simile-Widgets] How to make an object remain stationary on a timeline

2012-07-23 Thread Michael Nosal
Jeff Roehl jroe...@yahoo.com (818) 912-7530 From: Michael Nosal mno...@mitre.org To: simile-widgets@googlegroups.com Sent: Monday, July 23, 2012 12:41 PM Subject: Re: [Simile-Widgets] How to make an object remain stationary on a timeline Jeff, I've used the following code. You can define

Re: [Simile-Widgets] Tacking on an image to the beginning/end of a band?

2012-05-30 Thread Michael Nosal
Wait a sec... Are you referring to the 'tape' that is used to display a duration event? e.g. the bar that is drawn to show an event with different start and end dates? Band refers to the section of the timeline in which the events are drawn. 'Tape' refers to the bar drawn for a duration event.

Re: [Simile-Widgets] Simile Widget Timeline Disable Scroll ( Mousewheel + Drag )

2012-05-24 Thread Michael Nosal
If you set .timeline_start, you should also set .timeline_stop as well, or set stop to a date far in the future. I've noticed buggy behavior if I specify start and stop is null. I've tested on Chrome/Mac with Timeline 2.3.1 and it is working as expected. It should look like this: var theme

Re: [Simile-Widgets] Simile Widget Timeline Disable Scroll ( Mousewheel + Drag )

2012-05-24 Thread Michael Nosal
Right, the value needs to be a Javascript Date object, not a string. --Mike On May 24, 2012, at 3:34 PM, Steve Pai wrote: Thanks for the response Mike! That worked. At first I was using this form for start/stop: theme.timeline_start = Jan 1 2000 00:00:00 GMT; Then switched to this per

Re: [Simile-Widgets] Tacking on an image to the beginning/end of a band?

2012-05-24 Thread Michael Nosal
Yup, done that. It's pretty easy to tack on a div to your band. I modified the constructor for the Band to include an optional image: /* attached image div for the band */ if (bandInfo.bandImage) { this._bandImage = this._timeline.getDocument().createElement(div);

Re: [Simile-Widgets] Simile Widget Timeline Disable Scroll ( Mousewheel + Drag )

2012-05-23 Thread Michael Nosal
You can set timeline_start and timeline_stop in the theme for your bandInfo. These are the dates which will stop the timeline from scrolling past. This is useful if the user shrinks the window and you still want them to be able to get to everything in a range of dates. You can update these

Re: [Simile-Widgets] how can i insert image in timeline

2012-05-23 Thread Michael Nosal
Well, you could do it just like the example does. In your event data, include an icon attribute and point to the url where the image lives: events: [ { title: My Title, id:id_123, start: 2001-09-27, icon:

Re: [Simile-Widgets] Dedicate a horizontal row for a particular duration event

2012-05-23 Thread Michael Nosal
There are three approaches to this: 1) put all events of a specific type in their own band 2) write a function to put all events of a specific type in their own track within a band. 3) hardcode the track number in the event data itself Option 1 is useful when you might have overlapping events

Re: [Simile-Widgets] Simile Widget Timeline Disable Scroll ( Mousewheel + Drag )

2012-05-23 Thread Michael Nosal
Yes, they are attributes of the theme object. --Mike On May 23, 2012, at 4:23 PM, Steve Pai wrote: Is that a variable for theme? e.g., var theme = Timeline.ClassicTheme.create(); theme.timeline_start = Jan 1 2000 00:00:00 GMT; On Wed, May 23, 2012 at 1:11 PM, Michael Nosal mno

Re: [Simile-Widgets] How to trigger clicks on events

2012-04-23 Thread Michael Nosal
Timeline's painters provide a .showBubble method that takes an Event object. You can find the event you want in the EventSource for a Band, and call the .showBubble method for the painter for that Band. Example: (load the JFK timeline example and try this in the console) var band =

Re: [Simile-Widgets] Hide day labels on a given band

2012-03-28 Thread Michael Nosal
There's two ways to do this: Turn the labels off via CSS or Don't draw the labels in the first place (which improves performance) The first is easy. Add this css rule to your stylesheet: #timeline-band-x div.timeline-date-label {display:none} where x is the index of the band you wish to turn

Re: [Simile-Widgets] Re: Running Timeline completely Local

2012-03-28 Thread Michael Nosal
The default behavior of Google Chrome is to disallow file:/// url ajax requests. Search for same origin policy for file uris for more info. To avoid the need for any local server, and strictly view a timeline through file:///, you'll need to put your data inline or in a locally accessible .js

Re: [Simile-Widgets] Hide day labels on a given band

2012-03-28 Thread Michael Nosal
Kyle, That's a great solution. Many folks aren't comfortable with customizing the Javascript, but glad to see you go diving right in. For non-JS savvy folks, the CSS option will work for them. --Mike On Mar 28, 2012, at 2:29 PM, Kyle Hayes wrote: Ok, I implemented the method you mentioned

Re: [Simile-Widgets] Timeline event placement / ordering / sorting of events?

2012-03-22 Thread Michael Nosal
I've done this. It takes a few JS code changes. Note: You can put all of these changes in separate .js files that you load after Timeline. Don't make the changes in the Timeline source, or worse, in the timeline-bundle.js file. You'll save yourself a lot of trouble if you avoid

Re: [Simile-Widgets] Feeding Timeline with content in a JSF context

2012-03-22 Thread Michael Nosal
You want your server, Jetty, to be serving your event data, either as a static resource available at a specific url, or as dynamically generated data returned in response to a GET request for a specific URI. The Timeline.loadXML or Timeline.loadJSON functions will load your event data through

Re: [Simile-Widgets] Creating a vertical bar in the timeline

2012-03-21 Thread Michael Nosal
On Mar 20, 2012, at 5:19 PM, Steve Pai wrote: Michael, another question for you if you don't mind: I'd like to define start/end time in the form: '2000-01-01' rather than just year. If I change format in the JSON source file, the timeline appears to hit an error while trying to parse it.

Re: [Simile-Widgets] timeline date event listener?

2012-03-20 Thread Michael Nosal
On Mar 2, 2012, at 5:01 AM, Andrew Holbrook wrote: Hi, I came across timeline tonight and it looks very intriguing for a project of mine. I am curious, when I move the slider or double tap/ click on the timeline, is there any sort of event listener to connect to that will give me the new

Re: [Simile-Widgets] Creating a vertical bar in the timeline

2012-03-20 Thread Michael Nosal
These can be created with SpanHighlightDecorators. HotZones are used to expand/compress a span of time. SpanHighlightDecorators simply draw the highlighted region on the timeline band. You can easily specify these start/end times in a JSON file, which is loaded via ajax and then processed to

Re: [Simile-Widgets] Can't get Highlight or Filter Controls to display on my timeline...

2012-03-20 Thread Michael Nosal
On Jan 7, 2012, at 12:44 PM, i...@aproposfp.com i...@aproposfp.com wrote: Hi, I'm using the amazing Timeline widget to create a research timeline website. So far so good. But I can't get my html to display the filtering and highlighting controls at the bottom of my timeline. I'm

Re: [Simile-Widgets] [Timeline] add url/a href event title

2012-03-20 Thread Michael Nosal
On Jan 30, 2012, at 3:40 AM, Zulkifli Said wrote: i try to make an url event title in timeline. i add tag a href=www.google.com / in file jfk.xml. but it's not work. this is my wrong code: event start=Fri Nov 22 1963 12:54:00 GMT-0600 title=a href=www.google.comOffice Tippit

Re: [Simile-Widgets] Creating a vertical bar in the timeline

2012-03-20 Thread Michael Nosal
Simple example - lets add decorators to the Life of Monet example (http://simile-widgets.org/timeline/examples/monet/monet.html) Make a json file with the dates for your decorators (wars.json): [{title:Crimean War,start:1853,end:1856}, {title:Algerian War,start:1830,end:1847},

Re: [Simile-Widgets] Re: Easy for you - difficult for me.

2012-03-13 Thread Michael Nosal
I think the problem is with this: asp:Button ID=Button2 runat=server Text=Show Timeline OnClientClick=showTL() Width=166px / I'm guessing this produces HTML on your page that looks like: input type=submit id=Button2 onclick=showTL(); value=Show Timeline This is likely causing the problem

Re: [Simile-Widgets] Easy for you - difficult for me.

2012-03-12 Thread Michael Nosal
Andrew, It is simple to create the Timeline in response to whatever event you want - page load or button click. Changing the initialization from onload to onclick is very easy. If the timeline flashes on screen and then disappears, perhaps there is some other javascript error ocurring. Do you

Re: [Simile-Widgets] I cant get these timelines to scroll together

2012-01-27 Thread Michael Nosal
Make sure that you are creating separate bandInfos for each timeline, not passing the same one to each call to create your new Timeline. The centerVisibleDate depends on the ether being used for the band, and if you pass the same bandInfo objects to multiple timelines, they end up all using the

Re: [Simile-Widgets] I cant get these timelines to scroll together

2012-01-27 Thread Michael Nosal
Make sure you are using the developer's tools in your browser. Firebug is essential for Firefox development. The developer console in Chrome and Safari is also very helpful. All produce an error on Var foo JSLint.com is a tool that can be used for better understanding finer points of the

Re: [Simile-Widgets] I cant get these timelines to scroll together

2012-01-27 Thread Michael Nosal
All produce an error on Var foo I didn't see this in Firebug, under Console - Errors. Am I looking in the right place? My mistake - you're right - it fails silently in Firefox 9.0.1. --Mike -- You received this message because you are subscribed to the Google Groups SIMILE

Re: [Simile-Widgets] Adding a horizontal scrollbar to my timeline

2012-01-20 Thread Michael Nosal
Adding a vertical scrollbar to the timeline makes sense because the vertical height required to display all the events can exceed the available height for the timeline, or even exceed the height of the viewport. The scrollbar will work correctly because the height (of your timeline) is a fixed

[Simile-Widgets] Firefox 9 scrolling performance with Timeline

2012-01-06 Thread Michael Nosal
I've noticed a difference in scrolling performance of Timeline when using Firefox 9 compared to earlier versions of Firefox (on the Mac). The performance difference isn't so big if you have only two bands in your timeline, but with more bands, the performance goes down dramatically. I've

Re: [Simile-Widgets] timeline redrawing

2011-11-01 Thread Michael Nosal
Yes, adding events is separate from redrawing the timeline. If you look at sources.js, the last thing the loadXML and loadJSON functions do is: if (added) { this._fire(onAddMany, []); } You can manipulate events (adding, editing and removing) in an EventSource and then trigger

Re: [Simile-Widgets] timeline redrawing

2011-11-01 Thread Michael Nosal
repaint. --Mike On Nov 1, 2011, at 10:03 AM, Alvin Cheung wrote: Actually I tried that but that doesn't seem to do the trick (also tried eventSource._fire(onAddOne, [evt]). Is there something else that I need to do? On 11/1/2011 9:45 AM, Michael Nosal wrote: Yes, adding events is separate

Re: [Simile-Widgets] update highlight dynamically

2011-10-27 Thread Michael Nosal
Yes, this is possible, and quite easy to do. You do need to add a method to set the times for your decorator and call .paint() on the decorator: Timeline.SpanHighlightDecorator.prototype.setEndDate = function(date) { this._endDate = date; };

Re: [Simile-Widgets] update highlight dynamically

2011-10-27 Thread Michael Nosal
. Then is it possible to dynamically add decorators? Alvin On 10/27/2011 12:16 PM, Michael Nosal wrote: Yes, this is possible, and quite easy to do. You do need to add a method to set the times for your decorator and call .paint() on the decorator

Re: [Simile-Widgets] Timeline zooming performance

2011-09-29 Thread Michael Nosal
When panning the timeline, your mouse drag moves the div for the band by updating its left and/or top position. Timeline does not adjust the position of every element within a band - that is handled by the browser's DOM rendering. When zooming, duration events will change size, and all events

Re: [Simile-Widgets] Re: Updating timeline during scroll

2011-09-29 Thread Michael Nosal
You are on the right track, but the problem is that the onScrollListener gets called every time your Timeline moves a single pixel. You want this function to do nothing unless absolutely necessary. For example, your ajax request is asking test.php for new data for an entire day. You want to

Re: [Simile-Widgets] Will the Timeline accept XML Event Data in Elements form

2011-09-26 Thread Michael Nosal
Timeline.DefaultEventSource.loadXML method specifically looks for named attributes on the event element. It does not look for child elements. It would be possible to write your own XML parser to handle child elements instead of nodes. While the data encoded in your examples may be the same,

Re: [Simile-Widgets] Timeline problem - only first 6 events are shown in the timeline

2011-09-15 Thread Michael Nosal
Timeline changed to using classnames to set the background color of bands. The relevant selectors are: .timeline-band-0 .timeline-ether-bg{background-color:#eee} .timeline-band-1 .timeline-ether-bg{background-color:#ddd} .timeline-band-2 .timeline-ether-bg{background-color:#ccc} .timeline-band-3

Re: [Simile-Widgets] url with loadJSON

2011-09-15 Thread Michael Nosal
You cannot access json data in another domain via Ajax. This is a violation of the 'same origin policy' that helps protect against script attacks. You can have a proxy on your webserver that will fetch the data for you, or you can include it as a javascript file, or use JSONP to get the data to

Re: [Simile-Widgets] Browser differences

2011-09-09 Thread Michael Nosal
Your XML data file, ausHistory.xml includes the event attribute 'Id', not 'id' event Id=e659 start=Wednesday, 3 January 1900, 12:00:0 UTC title=Electric lighting is installed on Adelaide streets. image=../Media/AusHistory/TOOTnopic.png Electric lighting is installed on Adelaide streets. div

Re: [Simile-Widgets] Method for band a watermark (moving HighlightDecorator)

2011-09-09 Thread Michael Nosal
You're right, that is not the best performing solution ;-) If all you want to do is create a watermark for a band, there are a couple of better methods (this is with Timeline 2.3.1) 1) Add the text of your watermark to the timeline-ether-bg layer. Set the position of the timeline-ether-bg div

Re: [Simile-Widgets] Grouping Tracks in Timeline

2011-09-06 Thread Michael Nosal
The idea of a 'track' in Timeline is an abstract one - there is no DOM element representing a track, so there is no individual track background to color or style. Also, remember that Timeline's default painting strategy is to put things on different tracks to avoid overlapping

Re: [Simile-Widgets] Is it possible to have multiple month bands on one time line?

2011-08-31 Thread Michael Nosal
Did you remember to sync the bands before constructing the timeline? bandInfos[1].syncWith = 0; bandInfos[2].syncWith = 0; tl = Timeline.create(); --Mike On Jul 26, 2011, at 4:39 PM, Joe wrote: Hello everyone, I just started working with the SIMILE Widget and I wanted to create a

Re: [Simile-Widgets] Failed to derive URL prefix for Timeline API code files

2011-08-30 Thread Michael Nosal
The problem is you are loading the third-party dropdown.js file before your timeline-api.js. There is something in there that conflicts with the way timeline-api.js loads the Timeline code. Looking at the dropdown.js code, it's pretty archaic, and not representative of current Javascript coding

Re: [Simile-Widgets] Change Background Color for Simile Timeline

2011-08-30 Thread Michael Nosal
In Timeline 2.3.1, a change was made to switch from using the theme.ether.backgroundColors array to use the .timeline-ether-bg CSS class name instead. If you look in /src/webapp/api/styles/ethers.css, at the end of the file you'll see: .timeline-band-0 .timeline-ether-bg{background-color:#eee}

Re: [Simile-Widgets] How can I remove the timestamp from my popups?

2011-08-29 Thread Michael Nosal
There's a couple of ways to approach this. The contents of the popup are created in the fillInfoBubble method of Timeline.DefaultEventSource.Event. It calls the fillTime method, which checks if the event is an instant event or not, and if it is a precise or imprecise event. The timestamp shown

Re: [Simile-Widgets] Simile Timeline scalability.

2011-08-23 Thread Michael Nosal
Yes, dynamically loading of events via AJAX is possible. I've used this technique often, and it works extremely well. Here's what I did: On load of the timeline, I only load today's events, since the timeline is initially centered on the current time. The user sees all the events for the day.

Re: [Simile-Widgets] Support for multiple calendar numberings?

2011-08-23 Thread Michael Nosal
Timeline comes with support for Gregorian calendar support. Other calendars would require you to write custom javascript, namely an EtherPainter and a DateLabeller, for each calendar type you wish to use. If you look at timeline_2.3.1/src/webapp/api/scripts/ext/japanese-eras.js you can see an

Re: [Simile-Widgets] Re: Support for multiple calendar numberings?

2011-08-23 Thread Michael Nosal
wrote: Many thanks Mike. Sorry to be useless but where do I find the js file you told me to look at? - Stephen On Aug 23, 5:04 pm, Michael Nosal mno...@mitre.org wrote: Timeline comes with support for Gregorian calendar support. Other calendars would require you to write custom javascript

Re: [Simile-Widgets] Any way to set up the HOUR format to show am/pm

2011-08-23 Thread Michael Nosal
Javascript makes overriding/monkey patching pretty easy. I prefer to keep the Timeline code as distributed, and load in my overrides as necessary. Makes it easier to maintain and update. With Timeline 2.3.1, from

Re: [Simile-Widgets] Any way to set up the HOUR format to show am/pm

2011-08-23 Thread Michael Nosal
Glad to help. I try to avoid making changes to libraries directly, especially minified/compressed versions. Finding your changes in the code, or making changes without introducing side-effects can be really hard. If you don't want to go the route of loading your override after the minified

Re: [Simile-Widgets] overlay text labels on tape

2011-08-23 Thread Michael Nosal
Hi, I commented on the thread, and the advice still holds. Don't need to fork, just override the painter method with your own. If you make a copy of the painter functions and load after timeline-api.js has been loaded, your modified versions will replace the originals. Keeps the Timeline code

Re: [Simile-Widgets] Re: Weird Error While Manually Adding Event

2011-08-05 Thread Michael Nosal
That's because the simile.mit.edu version of Timeline is out of date. The method signature to the Event constructor changed from: Timeline.DefaultEventSource.Event = function( start, end, latestStart, earliestEnd, { to Timeline.DefaultEventSource.Event = function(args) { Using an

Re: [Simile-Widgets] Re: Weird Error While Manually Adding Event

2011-08-04 Thread Michael Nosal
for pointing that out. I applied your exact recommendation but I still get the same error message. On Aug 3, 10:50 pm, Michael Nosal mno...@mitre.org wrote: The error message suggests that something that should be a Date object, actually isn't (there is no method 'getTime') In your addBreakpoint

Re: [Simile-Widgets] Re: Timeline - Instant event width

2011-08-04 Thread Michael Nosal
-small-event-icon { width: 5px;} but in vain... On 3 août, 22:24, Michael Nosal mno...@mitre.org wrote: Do you mean the little ticks shown in an overview painter band? This is set in CSS: .timeline-small-event-icon {height:6px; width:1px;} Change width to the value you want (e.g. 2px

Re: [Simile-Widgets] Timelines without time

2011-08-04 Thread Michael Nosal
Yes, this is entirely doable. You do need to create your own functions to compute appropriate labels (Khz, Mhz, etc) and compare start/end values. You'd write a custom ether, which would allow you to do things like a log scale for frequencies. You'd need your own units.js to handle frequencies

Re: [Simile-Widgets] Timeline - Instant event width

2011-08-03 Thread Michael Nosal
Do you mean the little ticks shown in an overview painter band? This is set in CSS: .timeline-small-event-icon {height:6px; width:1px;} Change width to the value you want (e.g. 2px) --Mike On Aug 2, 2011, at 6:26 PM, var...@gmx.com wrote: Hello, First of all, thanks for your work on the

Re: [Simile-Widgets] Weird Error While Manually Adding Event

2011-08-03 Thread Michael Nosal
The error message suggests that something that should be a Date object, actually isn't (there is no method 'getTime') In your addBreakpoint function, you pass an object to the Timeline.DefaultEventSource.Event constructor. In this object, the value you have for start is a String, when it

Re: [Simile-Widgets] dynamically resize the font for all timeline items

2011-07-19 Thread Michael Nosal
This is easily managed by CSS. The default font size for the timeline is set in /timeline/src/webapp/styles.css .timeline-default { font-family: Trebuchet MS, Helvetica, Arial, sans serif; font-size: 8pt; border: 1px solid #aaa; } Changing the font-size declaration here will adjust

Re: [Simile-Widgets] Re: tracking when labels become visible

2011-07-13 Thread Michael Nosal
On Jul 12, 2011, at 3:46 PM, John S wrote: I was just talking with one of the creators of the Timemap project, and he had some good ideas, but the only suggestions he had, came directly from their plugin, which I'm not implementing, and likely won't because of the specific way I'm setting

Re: [Simile-Widgets] Is there a list of the intervals units?

2011-07-13 Thread Michael Nosal
In ajax/api/scripts/date-time.js: SimileAjax.DateTime.MILLISECOND= 0; SimileAjax.DateTime.SECOND = 1; SimileAjax.DateTime.MINUTE = 2; SimileAjax.DateTime.HOUR = 3; SimileAjax.DateTime.DAY= 4; SimileAjax.DateTime.WEEK = 5;

Re: [Simile-Widgets] Re: tracking when labels become visible

2011-07-12 Thread Michael Nosal
of posting sample code, lol. I'd love to hear some more ideas though. On Jul 11, 5:44 pm, Michael Nosal mno...@mitre.org wrote: John, What are you trying to make Timeline do? It would help if I understood what you were trying to accomplish. Attaching listeners to each individual event

Re: [Simile-Widgets] tracking when labels become visible

2011-07-11 Thread Michael Nosal
John, What are you trying to make Timeline do? It would help if I understood what you were trying to accomplish. Attaching listeners to each individual event is expensive to do, and can cause performance problems if done incorrectly. Timeline does support the ability to add listeners to the

Re: [Simile-Widgets] Make 2 seperate timelines scroll simultaneously

2011-06-22 Thread Michael Nosal
You want to attach a handler to each timeline to scroll the other. Here's a simple case of two timelines, tl_a and tl_b: tl_a.getBand(0).addOnScrollListener(function(band) { var centerDate = band.getCenterVisibleDate(); tl_b.getBand(0).setCenterVisibleDate(centerDate); });

Re: [Simile-Widgets] getCenterVisibleDate()

2011-06-22 Thread Michael Nosal
getBand(0) returns a Band object. You call getCenterVisibleDate on that which returns a Javascript Date object. You will need to convert that to a string before it can be sent back to the server. It should be like this: tl.getBand(0).getCenterVisibleDate().dateFormatAsString() where

Re: [Simile-Widgets] Re: Looking at loading events another way

2011-06-20 Thread Michael Nosal
This should work, except that the date format you're using is iso8601. The Simile parseDateTime function is expecting dates in a format like Jun 20 2011 22:00:00 To use the iso8601 format, you need to tell it to use the iso8601 format like this:

Re: [Simile-Widgets] Looking at loading events another way

2011-06-13 Thread Michael Nosal
John, This is perfectly fine to do. All that the Simile loaders do is extract data from a data source (JSON, XML, SPARQL) create new Event objects and push into an EventSource object. It's really easy to write your own function to do the same. With a little extra work,

Re: [Simile-Widgets] createBandInfo and createHotZoneBandInfo

2011-06-06 Thread Michael Nosal
Yes. createBandInfo is called to set up the overall definition of a timeline Band, primarily the ether definition and decorators for the Band. createHotZoneBandInfo is used to create regions (called 'zones') of the Band that differ in their ether, primarily in the pixelsPerInterval, Timeline

Re: [Simile-Widgets] Timeline utilities?

2011-06-02 Thread Michael Nosal
There's no reason you cannot use a CSV or other simple format for your Timeline data. The Timeline api comes with support for three different formats, JSON, XML and SPARQL. Adding support for another format, such as CSV, would involve writing a custom DefaultEventSource method for dealing with

Re: [Simile-Widgets] Timeline utilities?

2011-06-02 Thread Michael Nosal
Okay, here's one example (using Timeline_2.3.0 from simile-widgets.org). Editing a JSON file for Simile Timeline events by hand is a pain. Lots of quotes and curly braces. Let's try something simpler. It makes sense to try and use well defined data formats rather than cook up our own. YAML

Re: [Simile-Widgets] Info Bubble.

2011-05-31 Thread Michael Nosal
You'll want too customize the fillInfoBubble() method of the Event object. Look in /webapp/api/scripts/sources.js, where Timeline.DefaultEventSource.Event.prototype is defined. One of the member methods is a function called fillInfoBubble. This is what builds the content that goes in the info

Re: [Simile-Widgets] Simile timeline

2011-05-20 Thread Michael Nosal
Sure. Happy to help. You can ask on this list, or send a pm. --mike On May 20, 2011, at 10:20 AM, Browning, Bob (GLSD) wrote: User group, I have been examining the Simile timeline for possible use on a site I am creating. I noticed in the documentation about the local Timeline example.

Re: [Simile-Widgets] timeline: Dynamically Changing events displayed

2011-05-19 Thread Michael Nosal
You can change events at any time after they have been loaded. The events are accessible through the EventSource object. Timeline doesn't have event setters, but they are easy enough to add: jQuery.extend(Timeline.DefaultEventSource.Event.prototype,{ setStart: function(start) {if

Re: [Simile-Widgets] timeline: Dynamically Changing events displayed

2011-05-16 Thread Michael Nosal
What do you mean by dynamically change? If you mean simply loading different datasets at initialization time, then it is a simple call to loadXML (or loadJSON): tl.loadXML(examples/jfk/jfk.xml, function(xml, url) { eventSource.loadXML(xml, url); }); You just specify the path to the desired data

Re: [Simile-Widgets] timeline PointHighlightDecorator question

2011-03-15 Thread Michael Nosal
You need to call .remove() on the decorator. e.g. Timeline._Band.prototype.removeAllDecorators = function() { for (var i=0,l=this._decorators.length; i l; i++) { this._decorators[0].remove(); this._decorators.splice(0,1); } } I've done exactly as you describe

Re: [Simile-Widgets] How to find current position in Timeline?

2011-03-14 Thread Michael Nosal
Rex, Let's take a simple case - I want to send the center date of the timeline back to the server after the user has moved the timeline. However, I want the timeline to be still (not scrolling) for 1 second before reporting the center date back to my server. For example, if the user is

Re: [Simile-Widgets] dynamic decorators

2010-11-09 Thread Michael Nosal
Clemens, Yes, it is possible (and easy) to add/remove decorators dynamically. I needed to do exactly this. The decorators for a band are stored in an array in the band. We just need a function to add them: Timeline._Band.prototype.addDecorator = function(decorator) {

Re: [Simile-Widgets] dynamic decorators

2010-11-09 Thread Michael Nosal
doesn't disappear in the timeline. 3. How difficult is it to set an label to the center of a decorator? I don't need a start and end label, but an description for the highlighted area. Clemens Am 09.11.2010 um 17:55 schrieb Michael Nosal: Clemens, Yes, it is possible (and easy) to add

Re: [Simile-Widgets] Timeline: increasing space between the dots?

2010-09-02 Thread Michael Nosal
This is controlled by the intervalUnit and intervalPixels parameters when creating BandInfos. If your dots are too close together, choose a smaller intervalUnit (e.g. Timeline.DateTime.WEEK instead of Timeline.DateTime.MONTH) and/or choose a larger number of pixels per interval (e.g.

Re: [Simile-Widgets] Re: Timeline bubble background color modification

2010-06-21 Thread Michael Nosal
to host my own copy of the source merely to make these few changes? Thanks for any insight and for your patience. On Jun 1, 8:07 am, Michael Nosal mno...@mitre.org wrote: The bubbles are made from several images. See timeline/src/webapp/api/images - there are a dozen images that make up

Re: [Simile-Widgets] Timeline bubble background color modification

2010-06-01 Thread Michael Nosal
The bubbles are made from several images. See timeline/src/webapp/api/images - there are a dozen images that make up the parts of a bubble. The background color for the bubble is part of the image, so if you want bubbles with different background colors, you'll need to make new images. --Mike

Re: [Simile-Widgets] Re: Is it possible to explicitly specify which row an event appears on?

2010-05-13 Thread Michael Nosal
Timeline *does* put events in the same row if there is no overlap. You'll note that The Old Guitarist does overlap with Portrait of Pablo Picasso - Timeline uses a reverse iterator to loop through events - this means that when painting two overlapping events, the earlier event will be the one

Re: [Simile-Widgets] How to find current position in Timeline?

2010-05-04 Thread Michael Nosal
Sure, it's easy: tl.getBand(0).getCenterVisibleDate() will return the center of band 0. If your other bands are sync'ed to each other then that's all you need. Try adding this: var topBand = tl.getBand(0); topBand.addOnScrollListener( function(band) {

Re: [Simile-Widgets] Simile Timeline doesnt show up in IE at all (BoyScout Community Project)

2010-04-29 Thread Michael Nosal
Tobias, It looks like your date format is causing problems in IE. Date.parse(Thu Jul 01 00:00:00 +0200 2004) returns NaN in IE Date.parse(Thu Jul 01 00:00:00 2004 +0200) returns 108923760 Firefox handles both fine. Try changing the order of the year and timezone offset in your event dates

Re: [Simile-Widgets] problem: javascript Vs. Internet Explorer ( tl = null )

2010-04-27 Thread Michael Nosal
This means that IE can't find a variable named tl in scope. This could be due to the initialization of your timeline is failing in IE, or tl falling out of scope after initialization. Do you have an example online? --Mike On Apr 27, 2010, at 10:02 AM, Marcos Mendes wrote: Hi all, I had

  1   2   >