Using latest batik and java JDK
document of form (not correct syntax):

<svg width height id>   // container document
   <script> javascript file </script>

   <svg x y width height id=zoomandpancontrols >
         //zoom and pan controls with javascript onclick areas
   </svg>

   <svg x y width height  viewBox id=zoomeddocument>
         // actual document to zoom and pan
         <g transform="scale(1,1) id="zoom" >
             <g transform="translate(1.0,1.0)" id="pan">
                 path data....
             </g>
          </g>
    </svg>

</svg>

Javascript functions change transform for g tags in zoomed document to achieve
zooming and panning.

Problem
After zooming to 2X zoom, controls fail to work (don't create their javascript events)

Probable cause
When the zoomeddocument resizes, its associated area for javascript click zone is also resized WITHOUT being constrained to the sub document's size limits. Hence the zoomed document onclick area bleeds into other subdocument onclick areas intercepting the clicks.

This was verified by changing the order of the two subdocuments in the file. When the zoomed document is placed first in the file, before the controls document (so that
the controls are rendered last) the problem is cured.

Just to verify that currently batik has the wrong behaviour, Opera, Firefox and Adobe in IE
implementations of SVG do not have this problem.

Thanks for your efforts, anything to promote SVG is brilliant.


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

Reply via email to