GithubHelp home page GithubHelp logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024

Original comment by [email protected] on 7 Oct 2008 at 3:56

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
See new event attribute trackNum
Note that using this attribute turns off automatic placement of the events on 
the 
Timeline. Warning: Using this attribute enables you to easily be able to 
overlap 
event tapes and labels. (Not usually considered a good thing.)

Original comment by [email protected] on 2 Nov 2008 at 3:40

  • Changed state: Started

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Committed in rev 1654. 
Not tested: will leave that to the folks who asked for the change.

Original comment by [email protected] on 2 Nov 2008 at 5:41

  • Changed state: Fixed

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
This is looking good, thanks!

Is there some way to find out or control the number of tracks per band?

Original comment by [email protected] on 3 Nov 2008 at 11:21

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
The number of tracks depends on the "width" of the band, in pixels. The 
"width", for 
horizontal Timelines is the div's height. Since you set the "width" of the band 
(width attribute fed to Timeline.createBandInfo or 
Timeline.createHotZoneBandInfo), 
it is up to you.

You can calculate the number of tracks that will fit in a given number of 
pixels:
(band "width") / (theme.event.track.height +   theme.event.track.gap)

The divisor is from the theme file, unless overwritten by your client sw.


Original comment by [email protected] on 4 Nov 2008 at 4:46

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
In my project I'm finding that I can only fit a bit over half of this number.

The formula that's working for me is as follows:

(band width * .55) / (theme.event.track.height +   theme.event.track.gap)

Original comment by [email protected] on 4 Nov 2008 at 7:31

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Hmmm. Interesting. Have you varied the tape height from the default? Is your 
label 
font extra large? Using the original-painter?
The original-painter expects that the total height of a track, including the 
label, 
will be theme.event.track.height. So rather than using a scaling factor, I'd 
suggest 
figuring out what is really happening--perhaps you need to increase the track 
height.

You could test by increasing track height and seeing if your timeline increases 
its 
"width." If it does NOT, then you'll know that the old track height was smaller 
than 
the reality. Or use a developer's helper with FF to see exactly how high your 
tracks 
are.

I also know that in most circumstances the right track count calculation does 
not 
require any scaling factors since I use the same calculation for automatically 
setting the Timeline's width. And that works well with no overlaps, big gaps, 
etc. 
See example2 which includes autoWidth calculation.

Regards,
Larry

Original comment by [email protected] on 4 Nov 2008 at 9:08

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Thanks for the help!

I'm not doing any of those things you mentioned; just using the ClassicTheme. 
The images I'm using for markers 
are custom but they are 10x10px.

According to Firefox, my tracks are 14px high with an offset of 6px. If I use a 
track height of 20 instead of (theme.event.track.height +   
theme.event.track.gap) (which is 12 for me), I don't have to use the scaling 
factor.

Original comment by [email protected] on 4 Nov 2008 at 10:43

from simile-widgets.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I can't seem to get the "trackNum" parameter to work.  could someone provide an 
example code snippet in JSON format to demonstrate its use to me?
thanks,

bill

Original comment by [email protected] on 25 Nov 2008 at 7:33

from simile-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.