Jump to content


Photo

pan large image

image pan/scroll/zoom in/out

  • Please log in to reply
6 replies to this topic

#1 dan602

dan602

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 92 posts

Posted 17 February 2018 - 11:48 AM

Hi,

 

I want to be able to view (pan around) large images on a small mobile app. I am using TUnimImage to load the image from the server file system.

 

The screen area is too small for the image, so the screen will only show half the image (for example)

 

What would be the best way to allow the user to pan/scroll around? Possible even zoom in and out?

 

I have looked at using a TUnimScrollbox - but I cant seem to get it to work. 

 

Surely someone has implemented something similar - so any help/pointers/examples would be great.

 

Thanks.


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 17 February 2018 - 12:54 PM

Hi,

 

 

What would be the best way to allow the user to pan/scroll around?

 

Can you try with this config ?!:

 

UnimImage -> ClientEvents -> UniEvents -> function beforeInit:

function beforeInit(sender, config)
{
    config.scrollable = true;
}

  • 0

#3 dan602

dan602

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 92 posts

Posted 17 February 2018 - 02:43 PM

Hi Delphi Developer,

 

This made no difference for my scenario 


  • 0

#4 dan602

dan602

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 92 posts

Posted 18 February 2018 - 12:21 PM

Any other suggestion? I really only need a simplistic way of being able to pan, so then I can view other parts of the image on the screen, otherwise it is statically in the first of the image and cuts the rest off, with no way of viewing it.


  • 0

#5 rgreat

rgreat

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 197 posts

Posted 18 February 2018 - 12:42 PM

Javascript and handling mouse events.


  • 0

#6 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 18 February 2018 - 02:27 PM

Hi,

 

Any other suggestion? I really only need a simplistic way of being able to pan, so then I can view other parts of the image on the screen, otherwise it is statically in the first of the image and cuts the rest off, with no way of viewing it.

 

Ok, we will try

 

Best regards,


  • 0

#7 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 18 February 2018 - 08:47 PM

Farshad, could you add zooming in addition to the panning please.


  • 0

Andy





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users