Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with date spans (for negative dates) #41

Open
chieffff opened this issue Mar 14, 2012 · 4 comments
Open

Problems with date spans (for negative dates) #41

chieffff opened this issue Mar 14, 2012 · 4 comments

Comments

@chieffff
Copy link

When I initially load the timeline at zoom level 83, focusing the timeline at 3 m.e. bce , event with date "-3000000" is a few pixels too far to the left (at "-3039063 years" approximately).
When I try to change timescale using the slider, the situation is the same: event is some pixels too far to the left (for example "-3008010" instead of "-3000000" at zoom level 77).

WBR,
A. Sokoloff
Russia

@timeglider
Copy link
Owner

Thanks for filing this Alexander. This problem has been really vexing me.
Here's an attempt to at least understand the problem:

  1. We use "seconds per pixel" to calculate positioning of events on the
    screen, based on the focus date. Basically, if the seconds per pixel is off
    by a small amount, the farther left or right of center an event is, the
    more it's off. If the "seconds per pixel" are off by just a tiny
    percentage, it adds up fast for dates in the billions.

So, at these larger dates, we're allotting too few "seconds per pixel"
----- so a when you calculate (event_date - focus_date / seconds per pixel)
the offset of the events, they're not shifting far enough to the left. I'm
experimenting with a correction to this (which is at about 1%) for dates
over 1 million years...

  1. The second problem relates to how we, on the one hand, calculate pixel
    values from dates (related to problem multiple timelines bickering over who owns images, compressed tick marks... #1, with dates provided as
    YYYY-MM-DD, etc), and conversely, generate dates from pixel-values (or
    changes to pixel values), respecting pixel-value changes as one drags the
    timeline around. So there's a lack of total symmetry in the
    "date->seconds->pixels" and "pixels(->seconds)->date" algorithms.

I've gotten as far as evaluating the problem ------ I'll try to take it a
step farther in the coming week.

Michael

On Wed, Mar 14, 2012 at 5:16 AM, chieffff <
[email protected]

wrote:

When I initially load the timeline at zoom level 83, focusing the
timeline at 3 m.e. bce , event with date "-3000000" is a few pixels too
far to the left (at "-3039063 years" approximately).
When I try to change timescale using the slider, the situation is the
same: event is some pixels too far to the left (for example "-3008010"
instead of "-3000000" at zoom level 77).

WBR,
A. Sokoloff
Russia


Reply to this email directly or view it on GitHub:
#41

@chieffff
Copy link
Author

Thank you!
I will wait and hope :)

@chieffff
Copy link
Author

Hi! How are you?
Perhaps, there is a simple decision for my case?

@chieffff
Copy link
Author

By the way, It's seems to me that "timeglider-event-spanners" are positioned almost precisely...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants