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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,172

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Saturday, March 21st 2015, 6:52pm

BGBORDER problem

Hi,

i was trying and playing with the bgborder of a container.

when i like to change the bgborder it took me some time to find out that when you set it, it is like this:
bgborder="10,5,10,5 0xff0000 1"

but when you want to change it, you should leave the comma's out
like:
set(layer[test].bgborder, 20 20 20 20 0xffffff 1);

so i made an example to test it but it is not working good i think. Maybe i do something wrong..
http://www.virtualtuur.com/krpano/bgborder/
click the yellow button to switch

so the first change is ok but the change back skips the color change of the border.

i also tried:
switch(layer[test].bgborder, 20 20 20 20 0xffffff 1, 10 5 10 5 0xff0000 1); <=== DOESN'T WORK
switch(layer[test].bgroundedge, 200, 20);

roundedge works ok, border not.

xml http://www.virtualtuur.com/krpano/bgborder/tour.xml

*question*

EDIT: example changed after answer Klaus

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 2 times, last edit by "Tuur" (Mar 22nd 2015, 8:29am)


2

Sunday, March 22nd 2015, 8:19am

Hi,

you need to use 'quotes' to escape the ',' characters - e.g.

Source code

1
set(layer[test].bgborder, '10,5,10,5 0xff0000 1');


See also here:
http://krpano.com/docu/actions/#syntaxandusage

Quoted

To be able to use white-spaces and commas in a parameter, the parameter must be enclosed by
single ' or double quotes ".


Best regards,
Klaus

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,172

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Sunday, March 22nd 2015, 8:25am

*wacko*
*whistling*

of course..Thanks!
I could have think about that myself.. haha
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur