mayyangtaiwan / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE. modify title width/length #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is there a way to modify the width/length of a title? For my
isDuration=true events, my titles are very short, but they still do not fit
in the bounds of my event. Instead, the title appears to the right of the
event and it seems the titles all have some preset length.
 Description    
   Is there a way to modify the width/length of a title? For my
isDuration=true events, my titles are very short, but they still do not fit
in the bounds of my event. Instead, the title appears to the right of the
event and it seems the titles all have some preset length.
    Show »

[Submitted by david avery on simile.mit.edu] 

Whoops, forgot to say that when displayed, Description as visibile in the
colored bar would read "Physicians Northeast 2007 this is a"
[ Show » ]
david avery - 16/Oct/07 07:31 PM Whoops, forgot to say that when displayed,
Description as visibile in the colored bar would read "Physicians Northeast
2007 this is a"

[ Permlink | « Hide ]
david avery - 17/Oct/07 09:19 AM
OK, solved this by looking deeper into the JFK example. The width is
adjustable within the theme. I also noticed by looking at theme.js that the
200px width is set there. This is not a bug.

Solution:
var theme = Timeline.ClassicTheme.create();
theme.event.label.width = 500; // px changed here was default 200px
theme.event.bubble.width = 250;
theme.event.bubble.height = 200;

  var bandInfos = [
    Timeline.createBandInfo({
     eventSource: eventSource,
        width: "70%",
        intervalUnit: Timeline.DateTime.DAY,
        intervalPixels: 200,
        trackHeight: 1.2,
        trackGap: 0.5,
        theme: theme // << apply theme

[ Show » ]
david avery - 17/Oct/07 09:19 AM OK, solved this by looking deeper into the
JFK example. The width is adjustable within the theme. I also noticed by
looking at theme.js that the 200px width is set there. This is not a bug.
Solution: var theme = Timeline.ClassicTheme.create();
theme.event.label.width = 500; // px changed here was default 200px
theme.event.bubble.width = 250; theme.event.bubble.height = 200;   var
bandInfos = [     Timeline.createBandInfo({      eventSource: eventSource,
        width: "70%",         intervalUnit: Timeline.DateTime.DAY,        
intervalPixels: 200,         trackHeight: 1.2,         trackGap: 0.5,     
   theme: theme // << apply theme

[ Permlink | « Hide ]
David F. Huynh - 18/Oct/07 12:30 PM
Not our bug.

Original issue reported on code.google.com by GabrielR...@googlemail.com on 6 Apr 2009 at 1:44