Skip to main content
Open

Optimize preview zoom

Related products:Universal GUI
  • February 7, 2025
  • 6 replies
  • 78 views

Harm Horstman
Superhero

Change the behavior of the open/zoom function of the preview component to responsive, instead of opening images scaled to 100%.

See the example below. End users experience this as annoying.

 

 

Did this topic help you find an answer to your question?

6 replies

Leroy Witteveen
Moderator
Forum|alt.badge.img+3

Hi ​@Harm Horstman,

This feature is meant for cases in which the preview won't work due to CORS, not for zooming in specifically.
We only open the URL of the preview in a new browser tab, the rest is handled by the browser.
If we would instead handle this ourselves to achieve responsiveness, we again run into CORS disallowing us from viewing the URL.
For example, in our internal TCP Support Tickets screen, some tickets have an Azure DevOps workitem in the Preview component. We can't whitelist URLs for CORS in Azure DevOps so it can't be previewed, in this case the “Open preview in a new tab” functionality comes in handy:


Release notes for this feature:


Kind regards,
Leroy Witteveen


Leroy Witteveen
Moderator
Forum|alt.badge.img+3

@Harm Horstman,

As an alternative, you could let the preview component point to a HTML expression field in which you include the image URL inside of an <img src=”URL_HERE” /> tag and include an image zoom JavaScript library.

Kind regards,
Leroy Witteveen


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • February 7, 2025

Hi ​@Leroy Witteveen ,

Thanks for the explanation, I understand it more or less. 

In the meantime we have made a alternative solution that opens the URL, by means of a process flow, which results in the wanted behavior, without any CORS issues, for as far I see.

 

 

If this works, would it not be possible for you than to achieve the same with the showPreviewOpenButton option?


Leroy Witteveen
Moderator
Forum|alt.badge.img+3

@Harm Horstman,

You're using the “Open link” process flow action in that case, right?
I would expect it to work exactly the same as the showPreviewOpenButton.
Which browser and operating system are you testing this on? And are you sure you don't have a browser zoom applied in one scenario and don't have that in the other?



Kind regards,
Leroy Witteveen


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • February 7, 2025

@Leroy Witteveen ,

Correct, that is the action we use.

It works fine in all browsers and devices, also on an iPhone.

To be complete, this is the link we open...

https://………./indicium/sf/stt/document('7576A28E-40ED-436F-83A9-98E92FA1BAA7')/STT.download_doc_original_url_image_preview

This is a workable solution, but I would prefer making use of generic built-in functionality

 


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • February 10, 2025

Hi ​@Leroy Witteveen ,

I did some more research and see in the console that my solution does indeed give some error messages, which is not desirable.

Your idea to include the image URL inside, could work, but if this works, then I wonder why it is not possible for you to display images that are in a file storage fitting within the window in a new tab without errors with the ShowPreview button?

The picture below makes the whole problem clear: 

 




 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings