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.

ruffzy

Beginner

  • "ruffzy" started this thread

Posts: 5

Location: Einsiedeln, Switzerland

  • Send private message

1

Friday, November 22nd 2019, 11:05am

zorder not working between different Hotspots

Hi all

I am currently creating a pano which has multiple hotspots. When you move the mouse on one hotspot a layer is shown which gives more information about the spot. This is actually working finde.

Pls check out the pano here: https://www.enio.ch/custom/lapala/index.html

However the problem is that when the information layer for a hotspot is shown that some of the other hotspots are not covered by the layer. Pls check out the image here: https://download.enio.ch/DBKNOJRO/2019-1…e-Weg Flums.png

When I check out the z-order of the objects in html everything should actually be okey. It seems that for some hotspots the z-order relatively to each other is just ignored.

Can someone pls give me a hint?

kind regards, marco

spacerywirtualne

Professional

Posts: 940

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Friday, November 22nd 2019, 12:14pm

hello Marco

try add onover zorder+ and onout zorder-

Source code

1
2
str += "set(hotspot[" + spotname + "].onover,add(zorder,10);hotspot_over(" + spotname + "));";
str += "set(hotspot[" + spotname + "].onout,sub(zorder,10);hotspot_out(" + spotname + "));";


I haven't tested this code but I use it successfully

Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

ruffzy

Beginner

  • "ruffzy" started this thread

Posts: 5

Location: Einsiedeln, Switzerland

  • Send private message

3

Saturday, November 23rd 2019, 1:33pm

Hi Piotr

Yes indeed that helped a bit. After loading the panorama fresh it is working just fine. But after playing around a bit suddenly the issue occurs again.

Is zorder a global variable which is used when ever I create a new layer object?

Kind regards,
marco

spacerywirtualne

Professional

Posts: 940

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

4

Saturday, November 23rd 2019, 7:07pm

Is zorder a global variable which is used when ever I create a new layer object?
The zorder value is assigned to an element such as layer or hotspot.
Yes indeed that helped a bit. After loading the panorama fresh it is working just fine. But after playing around a bit suddenly the issue occurs again.

This code should be more reliable. Test it.

Source code

1
str += "set(hotspot[" + spotname + "].onloaded,asyncloop(hovering, add(zorder,10), sub(zorder,10)));";


Piotr
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*