Hi Larry:

It was pretty simple once I realized that some other DIVs were in
play. I have been using timeline with a package call EXT JS.
(extjs.com). It is pretty slick. If you have ever seen Java's SWING
L&F then you have a pretty good idea of what this package looks like.
Anyway, I have the timeline in an EXTJS panel object. Tha object is in
the center of the screen surrounded by borders and insets. It was the
width of those borders and insets plus the location of the enclosing
DIV that I had to use in my calculations:

* var where = timelinePanel.getPosition();
* var mouse = e.getXY();
* var X = (mouse[0]-where[0])-timeLine.getBand(0).getViewOffset();
.
.
.
.
*
editEventForm.setStartDate(timeLine.getBand(0).pixelOffsetToDate(X-5));

The "where" var contains the pixel offset from the left of the browser
window to the left edge of the enclosing DIV(timelinePanel). The
"mouse" var is an array with [0] as the x-axis. Of course
"timeLine.getBand(0).getViewOffset()" is from the timeline code.

I hope this helps anyone who is interested

greg


On Nov 10, 3:17 pm, LarryK <[EMAIL PROTECTED]> wrote:
> Hi Greg,
>
> Excellent. Please write a posting on your technique so others can make
> use of your work.
>
> Re: changes for the trunk. I need to update you on some issues. I'll
> send a private msg.
>
> Thanks,
>
> Larry
>
> On Nov 10, 2:05 pm, greg <[EMAIL PROTECTED]> wrote:
>
> > Hi Larry:
>
> >    OK! Got it to work. I used the "getViewOffset" function to get the
> > actual value of the x axis. I also had to take into account the
> > position of the timeline with an enclosing DIV. Once I put all that
> > together it works great.
>
> > Thanks,
> > greg
>
> > P.S. I understand that you have been busy the past week or so. Is
> > there anybody else I can communicate with about including my "ordered-
> > painter" code into the main trunk?
>
> > greg
>
> > On Nov 4, 12:43 pm, LarryK <[EMAIL PROTECTED]> wrote:
>
> > > Hi Greg,
>
> > > I suggest looking for other callers of the method to see what they do
> > > with the results. And what args they use.
> > > Sounds like an offset for the band is not being applied. Or an offset
> > > for the mouse co ords.
>
> > > Good luck,
>
> > > Larry
>
> > > On Nov 3, 9:37 pm, greg <[EMAIL PROTECTED]> wrote:
>
> > > > Hi All:
>
> > > > I need to get the Date/Time at an arbitrary point along a given event
> > > > tape. If I override the _showBubble function I notice that it contains
> > > > the x coord of the mouse click. I also discovered a function in the
> > > > Band class called "pixelOffsetToDate" . The Date/Time returned from
> > > > that function using the x coord from the showBubble function is WAY
> > > > off (approx. 2 years) what am I doing wrong?
>
> > > > Thanks,
> > > > greg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to