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.

iceman_fx

Professional

  • "iceman_fx" started this thread

Posts: 602

Location: Sachsen

Occupation: Webdesigner- und entwickler sowie Fotodesigner

  • Send private message

1

Friday, July 17th 2009, 9:03am

autorotate abfragbar, ob diese gerade sich dreht?

Hi Klaus,

kann man die autorotate-Funktion abfragen, ob die gerade in Aktion ist (also sich dreht, nicht enabled) ?

VG
iceman

2

Friday, July 17th 2009, 9:09am

Hi,

ja, mit "autorotate.enabled", z.B.:

Source code

1
... onclick="if(autorotate.enabled, trace(is enabled), trace(is not enabled) );"


Schöne Grüße,
Klaus

iceman_fx

Professional

  • "iceman_fx" started this thread

Posts: 602

Location: Sachsen

Occupation: Webdesigner- und entwickler sowie Fotodesigner

  • Send private message

3

Friday, July 17th 2009, 9:21am

Ich dachte, die prüft nur, ob die Autorotation aktiviert ist, aber dass die sich dabei nicht zwingend auch drehen muss?

VG
iceman

EDIT: könntest Du mir bitte auch noch einmal kurz die richtige Syntax für die If-Abfrage mitteilen?
Wann kann ich denn in den Else-Zweig gehen, bzw. wie muss ich das notieren ?

4

Friday, July 17th 2009, 9:56am

ja, richtig, ob es sich wirklich bereits dreht, lässt sich nicht abfragen,

syntax für if:

Source code

1
if(condition, trueaction, falseaction);

  • condition
    • can be only one variable - e.g. if(fullscreen, ...);
    • this variable will be compared against "true"
    • or the comparion of two variables, syntax:

      Source code

      1
      
      if(variableA OPERATOR variableB, ...);
    • supported operators:
      • "==" - equal
      • "!=" - not equal
      • "<" - lower than
      • "<" - greater than
      • "<=" - lower or equal than
      • ">=" - greater or equal than
      • because of the XML limitation of the usage of the '<' and '>' characters these operators are also supported: (e.g. for using inside an <action> tag)
      • "GT" - greater than
      • "LT" - lower than
      • "LE" - lower or equal
      • "GE" - greater or equal
  • trueaction- actions that will be called on true
  • falseaction - actions that will be called on false (optional, must not be defined)


examples:

Source code

1
if(fullscreen, action(fullscreen_setup), action(windowmode_setup) );

Source code

1
if(view.vlookat GE 45, set(view.vlookat, 45) );

Source code

1
if(plugin[xyz].visible == true, set(plugin[xyz].visible,false) );


Schöne Grüße,
Klaus