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.

benji33

Intermediate

  • "benji33" started this thread

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

1

Wednesday, October 22nd 2014, 10:18am

Devices check attributes

How to do something like that with .or. and .and. syntax ?

Source code

1
devices = (tablet AND NOT flash) OR (mobile AND NOT flash)


Before I was doing this because it seems that the AND take the advantage on the OR.

Source code

1
<krpano myVar="true" devices="tablet+!flash|mobile+!flash" />

2

Wednesday, October 22nd 2014, 1:52pm

Hi,

that still works - in the devices attribute itself and also in the attribute checks the AND will be resolved before the OR - see here:
http://krpano.com/docu/xml/#devices-notes

The setting:

Source code

1
devices="tablet+!flash|mobile+!flash"
and:

Source code

1
devices="tablet.and.no-flash.or.mobile.and.no-flash"
would be the same.

Or shorter: (also the same)

Source code

1
devices="no-desktop.and.html5"

Note - desktop, mobile and tablet are 'tri-state' settings, they can never be set at the same time, only one of these can be set:
http://krpano.com/docu/xml/#available-devices

Best regards,
Klaus

benji33

Intermediate

  • "benji33" started this thread

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

3

Thursday, October 23rd 2014, 9:28am

Perfect !