Hi,
If you revert this fix is the behavior improved?
https://github.com/codenameone/CodenameOne/commit/cd2951e61f685ed435203e1fad5c6eb45e222f9e#diff-472a53741e3367bcb92ab7ddfdce4d9957f1339bfdd0d9d011f069adace41ef0

On Thursday, January 21, 2021 at 11:43:18 AM UTC+2 [email protected] wrote:

> Hi
>
> I have noticed a chage of behavior on ImageViewer recently. Now, when 
> zooming, the image can go offlimits when panning, which is not convinient 
> at all.
>
> Could you please take a look? Here is a test case:
>
>         Form hi = new Form("Viewer", new BorderLayout());
>         FontImage img = FontImage.createMaterial(FontImage.MATERIAL_IMAGE, 
> UIManager.getInstance().getComponentStyle("Label"), 20f);      
>         ImageViewer viewer = new ImageViewer(img) {
>             int cilckCount = 0;
>             @Override
>             public void pointerReleased(int x, int y) {
>                 cilckCount ++;
>                 new UITimer(() -> cilckCount = 0).schedule(500, false, hi
> );
>                 if (cilckCount > 1) {
>                     cilckCount = 0;                    
>                     if (this.getZoom() > 1) {
>                         this.setZoom(1);
>                     } else {
>                         this.setZoom(2);
>                     }
>                 }
>             }            
>         };
>         hi.add(BorderLayout.CENTER, viewer);
>         hi.show();    
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/da8e2e1b-6f54-4e68-bdd4-f7f612eb0b86n%40googlegroups.com.

Reply via email to