And why are you insisting on using "window" as the parameter instead of the
actual "image"?

___

Oskar Krawczyk
http://nouincolor.com


On Tue, Dec 1, 2009 at 5:21 PM, Trevor Orr <[email protected]> wrote:

> This is what I came up with that gets close to the right numbers.
>
> this.xOffset = event.client.x - event.target.getPosition(window).x;
> this.yOffset = event.client.y - event.target.getPosition(window).y;
>
>
>
>
> On Tue, Dec 1, 2009 at 9:08 AM, Trevor Orr <[email protected]> wrote:
>
>> The only coordinates in the event seem to be the screen X/Y position.
>>
>>
>>
>>
>> On Tue, Dec 1, 2009 at 8:50 AM, ibolmo <[email protected]> wrote:
>>
>>> This information is also available in the Event. I forgot if it's
>>> clientX. You'd have to test for me.
>>>
>>> On Dec 1, 1:23 am, Oskar Krawczyk <[email protected]> wrote:
>>> >  From the docs:
>>> >
>>> > -------------
>>> >
>>> > Syntax:
>>> >
>>> > myElement.getPosition(relative);
>>> > Arguments:
>>> >
>>> > relative - (Element, defaults to the document) If set, the position
>>> > will be relative to this Element.
>>> >
>>> > -------------
>>> >
>>> > Sent from my iPhone
>>> >
>>> > On 1 Dec 2009, at 07:28, Trevor Orr <[email protected]> wrote:
>>> >
>>> >
>>> >
>>> > > I am trying to figured the coordinates of where an image is dragged
>>> > > from, meaning what X/Y position did the user hold the mouse button
>>> > > down on the image and begin dragging, not the X/Y position of the
>>> > > screen but the X/Y position on the image itself.  So if the image is
>>>
>>> > > 100 x 100 and the use drags form the center I should get back 50,
>>> > > 50.  I just seem to get screen coordinates and can't seem to figure
>>> > > out how to get the numbers.  This seems like it should be easy,
>>> > > maybe I am just up to late and too tired.  Ideas?
>>>
>>
>>
>

Reply via email to