You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, May 15th 2020, 3:52pm

Adjust Klaus' zoom image example to work on popup

Hi guys

How can I adjust this example:
https://krpano.com/examples/118/examples…ch-zooming.html

To work on an image popup?

I added the 2 actions into my xml, then I'm geussing I need to adjust my popup code, so I tried to adjust it like so:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
...
,type == 'image',
        set(popup,
            bgcolor=0xFFFFFF,
            bgalpha=1,
        );
        addlayer("popup_image", img);
        set(img,
            url=get(content),
            align=center,
            width=-20, height=-20,
            parent=get(popup.name),
            onloaded='popup_imageloaded()'
        );
		onover="
			set(iszoom, true);
			set(startzoom, true);
			copy(copy_mousefovchange, control.mousefovchange);
			copy(copy_touchzoom, control.touchzoom);
			set(control.mousefovchange, 0);
			set(control.touchzoom, false);
		";
		onout="
			set(iszoom, false);
			copy(control.mousefovchange, copy_mousefovchange);
			copy(control.touchzoom, copy_touchzoom);
		";
		ondown.touch="onover();";
		onup.touch="onout();";
    );
....
....


but its not working. No errors, the popup image just doesnt zoom....

This post has been edited 1 times, last edit by "Morne" (May 27th 2020, 7:59pm)


2

Monday, May 18th 2020, 8:16am

Any ideas?

3

Monday, May 25th 2020, 8:31pm

bump please...

4

Monday, June 1st 2020, 7:40am

Still cant get this to work

another bump please!

HansNyb

Professional

Posts: 1,031

Location: Denmark

Occupation: Photographer

  • Send private message

5

Monday, June 1st 2020, 10:58pm

Still cant get this to work


Why not use the Krpano flat image zoom solution. MAKE PANO (FLAT) Droplet.app

Check No 4 of the images solutions on my test page.
https://www.360-foto.dk/nationalhistoris…4834177468811);

6

Tuesday, June 2nd 2020, 6:58pm

Hi,

the image popup examples opens a 'html' element and gives the control of that element to the browser - e.g. for scrolling side it.

For zooming that inner content, there would need to be script inside that html that uses touch zooming gestures and then manually scales its own content somehow (e.g. with CSS-transforms).

That means depending on your exact needs, there will be not a simple solution. There is a difference between zooming the whole webpage by the browser and zooming only partial html elements.

Best regards,
Klaus

Scott Witte

Intermediate

Posts: 343

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

7

Wednesday, June 3rd 2020, 11:21pm

Howdy Morne,

This thread may give you the answer or at least enough info to work out your solution.

https://krpano.com/forum/wbb/index.php?p…&threadID=15195

8

Thursday, June 4th 2020, 8:40am

Howdy Morne,

This thread may give you the answer or at least enough info to work out your solution.

https://krpano.com/forum/wbb/index.php?p…&threadID=15195


Yes I did see that thread and I also linked to the example it referenced.

The problem is I'm not zooming on an image layer, I'm zooming on a popup. I've tried various things to modify the code but I can't make it work on an image popup.

I've also not seen a single example working for zooming an image popup, just like zooming Klaus's image, except in paid plugins.

9

Thursday, June 4th 2020, 8:49am

Ideally, would be good to just integrate PhotoSwipe in, but I have no idea where to even start to adjust the code as the image popup in these examples are called with html and javascript

https://photoswipe.com/

Scott Witte

Intermediate

Posts: 343

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

10

Thursday, June 4th 2020, 7:06pm

The problem is I'm not zooming on an image layer, I'm zooming on a popup. I've tried various things to modify the code but I can't make it work on an image popup.

Apologies for being dense, but isn't your "popup" a layer? You even create it with an addlayer action. In the thread I linked to, San7 shares code that does what I think you want. What am I missing?