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 Jorg Heymans <jh...@domek.be> on 2005/03/03 01:19:37 UTC

[PATCH] "proper" panning (was Re: panning issue)

Attached patch seems to do the trick ok.

There is just one (cosmetic) thing : batik does not repaint the shape 
straight away after you've partially panned it off the canvas, and then 
pan it back in. The part that panned off the canvas only gets redrawn 
when you stop panning.

I don't know if this can be easily fixed somehow.

WDYT about the approach? I don't know how to run the testsuite so i 
don't know whether this patch introduces any regressions.

Regards
Jorg

Jorg Heymans wrote:
> Hi,
> 
> I have an issue with the default panning functionality of JSVGCanvas.
> 
> Using shift-leftmouse you can pan the content of the canvas around, but 
> as soon as you move the mouse outside of the canvas the shapes jump 
> straight back to where they were before the panning started.
> Now i experimented a bit with other gfx programs, most of them stop 
> panning the panned object as soon as the mouse pointer leaves the 
> canvas. If you then release the mousebutton the object just stays where 
> it was when the panning stopped. It seems to me this is fairly intuitive 
> behaviour.
> 
> 
> I am looking at producing a patch for this, it is not that trivial. For 
> example mouse entered and mouse exited events are not always delivered 
> (seems to depend just how quick you hover the mouse over edge).
> 
> Any comments before i proceed with this?
> 
> 
> Regards
> Jorg