Sie sind nicht angemeldet.

1

Freitag, 6. November 2009, 04:31

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:

Quellcode

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:

Quellcode

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

Sonntag, 8. November 2009, 19:16

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.

Quellcode

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

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

3

Sonntag, 8. November 2009, 20:19

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*

4

Sonntag, 8. November 2009, 20:48

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)

Zitat von »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.