Sie sind nicht angemeldet.

1

Sonntag, 18. Juni 2017, 00:04

Polylines ZOrder behind Hotspots

Hi all!

I am trying to add a hotspot PNG image IN FRONT OF a hotspot-polyline.

Is this possible?

I have been trying changing Z-Order, changing the creation order, etc... but to no avail !

Investigating this a bit further, it seems that polylines are SVG rendereings ON TOP OF the krpano player. Is this why I can't change placing the hotspot polylines behind a hotspot image?

My JS code for reference:

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
34
35
36
			//Add a new hotspot (polyline)
			objKrPano.call("addhotspot(l"+strID+"-line); "+ 
					"set(hotspot[l"+strID+"-line].fillalpha, 0.0); "+ 
					"set(hotspot[l"+strID+"-line].polyline, true); "+ 
					"set(hotspot[l"+strID+"-line].bordercolor, 0x880000); "+ 
					"set(hotspot[l"+strID+"-line].zorder,5); "+
					"set(hotspot[l"+strID+"-line].borderalpha, 1.0); "+ 
					"set(hotspot[l"+strID+"-line].borderwidth, 2.0); " );

			//Add Hover points
			objKrPano.call("set(hotspot[l"+strID+"-line].point[0].ath,"+(fltAngle)+"); set(hotspot[l"+strID+"-line].point[0].atv,"+(fltPitch)+");");
			var intS = 20, intArrowA = 360 / intS;
			for(var intI = 0; intI <= intS; intI++) {
				dCos = Math.cos((Math.PI / 180) * intArrowA * intI); 
				dSin = Math.sin((Math.PI / 180) * intArrowA * intI);
				
				tmpH = (intArrowH * dCos) - (intArrowV * dSin);
				tmpV = (intArrowH * dSin) + (intArrowV * dCos);
				
				objKrPano.call("set(hotspot[l"+strID+"-line].point["+(intI + 1)+"].ath,"+(fltPointerAngle + tmpH)+"); set(hotspot[l"+strID+"-line].point["+(intI + 1)+"].atv,"+(fltPointerPitch + tmpV)+");");
			}
			objKrPano.call("set(hotspot[l"+strID+"-line].zorder,0);" );


		objKrPano.call("addhotspot("+strID+"); ");
		objKrPano.call("set(hotspot["+strID+"].url,"+strImageUrl+"); "+ //projects/Factory/Content/Texture/360 Still Normal.png); "+
				"set(hotspot["+strID+"].ath,"+fltAngle+"); "+ //45); "+
				"set(hotspot["+strID+"].atv,"+fltPitch+"); "+
				"set(hotspot["+strID+"].scale,"+fltScale+"); "+ //0.7); "+
				"set(hotspot["+strID+"].distorted,true); "+
				"set(hotspot["+strID+"].zorder,1); "+
				"set(hotspot["+strID+"].onover, action_mouse_over("+strID+", "+strID+"-over, "+strID+"-click); ); "+
				"set(hotspot["+strID+"].onout,  action_mouse_out("+strID+", "+strID+"-over, "+strID+"-click); ); "+
				"set(hotspot["+strID+"].onclick,action_mouse_click("+strID+", "+strID+"-over, "+strID+"-click, '"+strClickJS+"'); ); "+
				"set(hotspot["+strID+"].zoom,false); "+
				"set(hotspot["+strID+"].visible, "+strVisible+"); ");


Florian

2

Montag, 19. Juni 2017, 09:47

Hi,

please see this post:
zorder of hotspot vs poly hotspot

Best regards,
Klaus

3

Mittwoch, 21. Juni 2017, 14:13

I responded my solution in that thread, in case it adds. Thank you for this pointer.