Sie sind nicht angemeldet.

1

Donnerstag, 12. Januar 2017, 19:10

Condition depth in hotspot

Hi,

I'm trying to change the depth on hotspots conditionally based on whether the device is mobile or desktop.

For mobile devices, I want a depth of 1000. The depth varies on desktops.

I've tried

Quellcode

1
<hotstpot name="test" ... depth="if(device.mobile, 1000, 1800)" />


to no avail. Can anyone point out my issue?

2

Freitag, 13. Januar 2017, 08:50

Hi,

'calc:' with a ternary operator could be used:
http://krpano.com/docu/xml/#xmlcalc
http://krpano.com/docu/actions/#expressions

E.g.

Quellcode

1
depth="calc:device.mobile ? 1000 : 1800"

or depth defined this way:

Quellcode

1
2
depth.mobile="1000"
depth.normal="1800"

Best regards,
Klaus