Sie sind nicht angemeldet.

1

Freitag, 15. Mai 2020, 15:52

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:

Quellcode

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....

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Morne« (27. Mai 2020, 19:59)


2

Montag, 18. Mai 2020, 08:16

Any ideas?

3

Montag, 25. Mai 2020, 20:31

bump please...

4

Montag, 1. Juni 2020, 07:40

Still cant get this to work

another bump please!

HansNyb

Profi

Beiträge: 1 063

Wohnort: Denmark

Beruf: Photographer

  • Nachricht senden

5

Montag, 1. Juni 2020, 22:58

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

Dienstag, 2. Juni 2020, 18:58

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

Fortgeschrittener

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

7

Mittwoch, 3. Juni 2020, 23:21

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

Donnerstag, 4. Juni 2020, 08:40

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

Donnerstag, 4. Juni 2020, 08:49

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

Fortgeschrittener

Beiträge: 382

Wohnort: Milwaukee, WI USA

Beruf: Professional Photographer

  • Nachricht senden

10

Donnerstag, 4. Juni 2020, 19:06

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?