You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2008/02/07 02:47:52 UTC

Re: batik problem with inner documents

Hi Ken,

"ken.bingham01" <ke...@ntlworld.com> wrote on 01/24/2008 07:50:25 
AM:

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

> 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 is definitely the cause.  But it isn't clear that it's
a bug in Batik.  The SVG spec doesn't indicate how clip interacts
with events.  There are good arguments on either side of this.
In reality you probably want to be able to control the behavior.

> 
> <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.
> 
> 
> 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: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>