xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: grab DOM event?
Date Fri, 05 Sep 2003 20:14:01 GMT
Denis Bohm wrote:
>>>2) No mouse events are dispatched when the mouse is moved over areas in
> the
>>>canvas that don't have any elements drawn.  The worst case here is that
>>>mouse releases are lost if done in one of these areas.
>>   Sure but this is easily fixed by putting a non-rendered rectangle
> behind
>>all the content.
> What happens when the JSVGCanvas isn't the exact same aspect ratio as the
> document?  Then the rectangle doesn't cover all of the canvas and the
> problem comes back?

Make the rectangle bigger than the canvas:

<rect x="-500%" y="-500%" width="1000%" height="1000%"

>>>3) If you press the mouse within the JSVGCanvas, then drag outside the
>>>canvas, then release the mouse - the release is not dispatched.
>>>The last point seems like something that can't be worked around and could
>>>use some handling in JSVGCanvas to pass the release event on - maybe with
>>>the target being the document or root element?  The spec doesn't seem to say
>>>anything about this kind of situation, or does it?
>>   You should always recieve a mouseout event with a 'null' relatedTarget
>>in this case.  I don't think the SVG Specification deals with this
>> directly.
> Getting a mouseout event doesn't really help me.  I don't want to cancel the
> operation based on mouseout as the user could drag the mouse back into the
> window and then release.  I really need to get a mouseup and I don't seem to
> be getting one right now.  Should I get a mouseup with a null relatedTarget?

   Well if you got anything it would be a mouseup with a null 'target'
but such a thing doesn't exist.  I understand your desire but it's
also not 100% clear to me that we should deliver such an event (first
off I think it would likely break lots of code that assumes there
will always be a target).  Anyone else care to weigh in with opinions?
I don't care for the target document or root because it just doesn't
make sense.  Any what would you use for clientX/Y?  values outside of
the viewport?  These of course of 'cleaness' arguments where as you
have a solid need.

   Anyway contributions are always welcome - if done well it would
probably be accepted.

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message