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.

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

1

Friday, November 6th 2009, 4:31am

Border attribute for <area> node

Hi Klaus,

Is there an attribute to set a border to the area? I have tried with <area border="2" ...> but it seems border does not exist.

Also, trying to answer a thread from machart (new approach for widescreen presentation) I have made a working border to the area in this way:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
	<!-- border  -->
	<plugin name="border_top"    url="border_x2.png" enabled="false" align="lefttop"    edge="lefttop"	/> 
	<plugin name="border_bottom" url="border_x2.png" enabled="false" align="leftbottom" edge="leftbottom" />
	<plugin name="border_left"   url="border_x2.png" enabled="false" align="lefttop"    edge="lefttop"   /> 
	<plugin name="border_right"  url="border_x2.png" enabled="false" align="righttop"   edge="righttop"  />

	<!-- action to set the border of the area -->	
	<action name="set_border">
		set(plugin[border_top].width,get(area.width));
		set(plugin[border_bottom].width,get(area.width));
		set(plugin[border_left].height,get(area.height)); 
		set(plugin[border_right].height,get(area.height)); 
	</action>

Here an example working with this code: http://andorra360.com/test/ForumKrpano/machart/area.html
It is ok.

But, before using this working border code, I was using the same code with the plugins aligned in a different way... Like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
	<!-- border  -->
	<plugin name="border_top"    url="border_x2.png" enabled="false" align="top"	edge="top"    /> 
	<plugin name="border_bottom" url="border_x2.png" enabled="false" align="bottom" edge="bottom" />
	<plugin name="border_left"   url="border_x2.png" enabled="false" align="left"   edge="left"   /> 
	<plugin name="border_right"  url="border_x2.png" enabled="false" align="right"  edge="right"  />

	<!-- action to set the border of the area -->	
	<action name="set_border">
		set(plugin[border_top].width,get(area.width));
		set(plugin[border_bottom].width,get(area.width));
		set(plugin[border_left].height,get(area.height)); 
		set(plugin[border_right].height,get(area.height)); 
	</action>

Here an example working with this code: http://andorra360.com/test/ForumKrpano/m…er_problem.html
Here, the sides of the border have a strange behaviour... if you try to resize the browser, when the area.width or area.height are odd, the corresponding border does not match the entire area.width or area.height. *wacko*

Is it a bug?

Anyway, I like the new area feature... It gives a lot of new possibility. Great *thumbup*

Thank you Klaus.
SAlut.

2

Sunday, November 8th 2009, 7:16pm

Hi,
Is there an attribute to set a border to the area? I have tried with <area border="2" ...> but it seems border does not exist.
no, there is no border attribute at the moment,
and I'm not sure if making one makes sense, because there must be also a lot of other settings, e.g. borderwidth, color, and so on...
making a border by images or maybe by a dedicated "border" plugin should be better and more universal,


Here an example working with this code: http://andorra360.com/test/ForumKrpano/machart/area.html
great example btw.

Here an example working with this code: http://andorra360.com/test/ForumKrpano/m…er_problem.html
Here, the sides of the border have a strange behaviour... if you try to resize the browser, when the area.width or area.height are odd, the corresponding border does not match the entire area.width or area.height. *wacko*

Is it a bug?
yes and no
to avoid "jumpy" positions when switching between different flashplayer quality settings (like when switching between movequality LOW and stillquality HIGH), internally the position calculation rounds some values, this leads to this effect,

it can be solved by using not centered align positions (left,top,bottom,right,center) like you already did,
or by setting a currently undocumented attribute - accuracy="1" - then the width in the position calculated will not be rounded and it will work correct,

something other too - when using - width="100%" and height="100%" - the border sizes must not be updated manually, then they will scale automatically

e.g.

Source code

1
2
3
4
<plugin name="border_top" url="border_x2.png" enabled="false" align="top" width="100%" accuracy="1" /> 
<plugin name="border_bottom" url="border_x2.png" enabled="false" align="bottom" width="100%" accuracy="1" />
<plugin name="border_left" url="border_x2.png" enabled="false" align="left" height="100%" accuracy="1" /> 
<plugin name="border_right" url="border_x2.png" enabled="false" align="right" height="100%" accuracy="1" />


best regards,
Klaus

Tuur

Sage

Posts: 3,261

Location: Netherlands

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

  • Send private message

3

Sunday, November 8th 2009, 8:19pm

Hi,

is it possible to put the google maps map or the control buttons outside the stage with this??

so , in the black area?

Cheers

Tuur *thumbsup*

ps nice but difficult code michel... i try to understand... *huh*
http://www.virtualtuur.com
Skype:studiotuur

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Sunday, November 8th 2009, 8:48pm

Hi KLAUS,
something other too - when using - width="100%" and height="100%" - the border sizes must not be updated manually, then they will scale automatically
More easy now. I have posted an example here: How to reset the <area> to the default ?

Thank you KLAUS *thumbup*


Hi Tuur,
all plugins will also be automatically aligned inside this area,
but to aligned a plugin/image outside of it, set the "parent" attribute
of this plugin to "STAGE" (but note some plugins, like the googlemaps one will require an update to get this working)

Quoted from "Tuur"

ps nice but difficult code michel...
Not so difficult ;-) . Look at the link above to see an example code. (there is some comments in the code to explain *smile* )

SAlut.