tkormann    02/05/17 01:16:53

  Modified:    samples/tests/spec/linking anchorInsideText.svg
               sources/org/apache/batik/bridge BridgeEventSupport.java
  Log:
  fix a bug with mouseout on <tspan>
  
  add a new case in the coresponding test (the test is using <a> because
  the anchor code leverages DOM event type 'mouseout' and 'mouseover').
  
  Revision  Changes    Path
  1.2       +5 -1      xml-batik/samples/tests/spec/linking/anchorInsideText.svg
  
  Index: anchorInsideText.svg
  ===================================================================
  RCS file: /home/cvs/xml-batik/samples/tests/spec/linking/anchorInsideText.svg,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- anchorInsideText.svg      29 Apr 2002 13:20:18 -0000      1.1
  +++ anchorInsideText.svg      17 May 2002 08:16:53 -0000      1.2
  @@ -14,7 +14,7 @@
   <!-- test anchor inside text                                                -->
   <!--                                                                        -->
   <!-- @author [EMAIL PROTECTED]                                               -->
  -<!-- @version $Id: anchorInsideText.svg,v 1.1 2002/04/29 13:20:18 tkormann Exp $ -->
  +<!-- @version $Id: anchorInsideText.svg,v 1.2 2002/05/17 08:16:53 tkormann Exp $ -->
   <!-- ====================================================================== -->
   <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>  
   
  @@ -110,6 +110,7 @@
   <!-- ################################################## -->
   
   <use xlink:href="#Path1" />
  +
   <a xlink:href="#black">
   <text x="50" y="300" fill="black">This is simple
   <textPath fill="crimson" xlink:href="#Path1" startOffset="0%"><a 
xlink:href="#crimson">text on a path
  @@ -119,6 +120,9 @@
   </text>
   </a>
   
  +
  +<text x="50%" y="350" text-anchor="middle">Only the 
  +<a xlink:href="#crimson"><tspan fill="crimson">crimson tspan</tspan></a> has an 
anchor</text>
   
   </g>
   
  
  
  
  1.36      +14 -3     
xml-batik/sources/org/apache/batik/bridge/BridgeEventSupport.java
  
  Index: BridgeEventSupport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/bridge/BridgeEventSupport.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- BridgeEventSupport.java   14 May 2002 08:57:31 -0000      1.35
  +++ BridgeEventSupport.java   17 May 2002 08:16:53 -0000      1.36
  @@ -50,7 +50,7 @@
    * fowarding them to the DOM as regular DOM MouseEvent.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]>Thierry Kormann</a>
  - * @version $Id: BridgeEventSupport.java,v 1.35 2002/05/14 08:57:31 vhardy Exp $
  + * @version $Id: BridgeEventSupport.java,v 1.36 2002/05/17 08:16:53 tkormann Exp $
    */
   public class BridgeEventSupport implements SVGConstants {
   
  @@ -125,6 +125,17 @@
           }
   
           public void mouseExited(GraphicsNodeMouseEvent evt) {
  +            Point clientXY = getClientMouseLocation(evt.getPoint2D());
  +            GraphicsNode node = evt.getGraphicsNode();
  +            Element targetElement = getEventTarget(node, clientXY);
  +            if (lastTargetElement != null) {
  +                dispatchMouseEvent("mouseout", 
  +                                   lastTargetElement, // target
  +                                   targetElement,     // relatedTarget
  +                                   clientXY,
  +                                   evt,
  +                                   true);
  +                                   }
               dispatchMouseEvent("mouseout", evt, true);
           }
   
  @@ -216,8 +227,8 @@
                       ("dispatching "+eventType+
                        " target:"+targetElement.getLocalName());
   
  -            }*/
  -
  +            }
  +            */
               short button = getButton(evt);
               Point screenXY = getScreenMouseLocation(clientXY);
               // create the coresponding DOM MouseEvent
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to