Sie sind nicht angemeldet.

1

Dienstag, 11. Mai 2010, 19:45

align the "area"

right now i think that the area when used is always aligned to the topleft corner of the stage. is there a way to align the are to the center? i have some images i would like to display in a static window size but do not like that they then are displayed in the topleft corner. i tried to set area.align to center but it is an unrecgonizable command. would be nice to be able to use align and origin and edge on the area attributes just like a plugin or hotspot.

Klaus is this possible?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

2

Mittwoch, 12. Mai 2010, 10:44

Yeah and also make a margin in it , so we can set bottom margin, right margin etc..

VN when you do 50% and 50% you will be in the middle. Did you try origin?
Also when u use the stage at that momnet you can do like 40% and area width 10%. ..

try it it works nice.. if that is what you mean..

Tuur *thumbsup*

3

Mittwoch, 12. Mai 2010, 12:04

Hi,

at the moment the only possible way would be to use the "onresize" event
and calculate the positions of the area manually:

e.g.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<events onresize="set_custom_area_pos_and_size();" />

<action name="set_custom_area_pos_and_size">
  <!-- set a fixed size area -->
  set(area.width, 500);
  set(area.height, 300);

  <!-- center it -->
  sub(tmpx, stagewidth, area.width);
  sub(tmpy, stageheight, area.height);
  mul(area.x, tmpx, 0.5);
  mul(area.y, tmpy, 0.5);
</action>


best regards,
Klaus

4

Donnerstag, 13. Mai 2010, 18:50

I have a fixed sized map and would like to have my pano fill the rest of the page (map is on the bottom). Is there a way to calculate the remaining space (because people have different resolutions)?

stageheight - mapheight or so? But how?
mapheight is a fixed height.

And... margins? How to do that?

5

Donnerstag, 13. Mai 2010, 18:59

Ok margins found! But is there any documentation about that 'sub' and 'mul' and more of that?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »maaike« (13. Mai 2010, 19:17)


6

Mittwoch, 19. Mai 2010, 09:51

Anybody? How to change the size of the pano in an area on the space that's left (above the map, which has a fixed size)?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

7

Mittwoch, 19. Mai 2010, 11:51

he poep,
fix the area, or % .. no margins possible yet (!) with the area..

Laters


A *thumbsup*

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

8

Mittwoch, 19. Mai 2010, 11:54

maybe make the map also do like 10% and the area 85%? x and y ?

Tuur

9

Mittwoch, 19. Mai 2010, 11:55

he poep,
fix the area, or % .. no margins possible yet (!) with the area..


Poep? Hm... is it positive or a brown thing? :P

I tried %, but what I want is a that the map has a fixed size and the remaining space (height) is filled by the pano (area).


Ff in NL: de map heeft een height van bijv. 200px, dan wil ik dat de pano de rest van de hoogte opvult (min een paar pixels natuurlijk). Dus als m'n browser 800x600 is wordt de pano nog 400 (ok, iets minder) en als m'n browser 1280x1024 is wordt de pano 800 pixels. Snappie?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

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

  • Nachricht senden

10

Mittwoch, 19. Mai 2010, 12:03

Ja .. that's 70% on the y for the pano.. but make that a bit less..
or .. area origin ..bottom... then it's flexibel at the top.. but i don't know if that works..



example..

http://www.virtualtuur.com/mobiel3/

here the area is starting at x =20 y=50 or so align = lefttop (?) and the height=80% width=95%
or so ... not shure about the exact numbers out of my head ..

watch out that it doesn't overlap the map.. but you get that any way when brouwser is 300x200 or so..

ja die bruine ;-P

A

Graydon

Profi

Beiträge: 614

Wohnort: Texas

Beruf: Industrial gas turbine services.

  • Nachricht senden

11

Donnerstag, 27. Mai 2010, 08:12

is there any documentation about that 'sub' and 'mul' and more of that?


Check out the releasenotes....txt file that is in the download package.

Per the releasenotes-1.0.8.10.txt

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 - add/sub/mul/div/mod math operators
   - usage:
   
 	with 2 parameters:
  	- add(dst,val1)  =>  dst = dst + val1 (like +=)
  	- sub(dst,val1)  =>  dst = dst - val1 (like -=)
  	- mul(dst,val1)  =>  dst = dst * val1 (like *=)
  	- div(dst,val1)  =>  dst = dst / val1 (like /=)
  	- mod(dst,val1)  =>  dst = dst % val1 (modulate)
   
 	with 3 parameters:
  	- add(dst,val1,val2)  =>  dst = val1 + val2
  	- sub(dst,val1,val2)  =>  dst = val1 - val2
  	- mul(dst,val1,val2)  =>  dst = val1 * val2
  	- div(dst,val1,val2)  =>  dst = val1 / val2
  	- mod(dst,val1,val2)  =>  dst = val1 % val2 (modulate)
  	
	- val1/val2 can be values or variables


dst = destination

12

Dienstag, 22. Juni 2010, 22:45

I have a fixed sized map and would like to have my pano fill the rest of the page (map is on the bottom). Is there a way to calculate the remaining space (because people have different resolutions)?

stageheight - mapheight or so? But how?
mapheight is a fixed height.


I found how to do it:

Quellcode

1
2
3
4
5
6
sub(destwidth,stagewidth,275);
sub(destheight,stageheight,101);
set(area.x,10);
set(area.y,10);
copy(area.width,destwidth);
copy(area.height,destheight);


The action is also 'called' by an onresize.

(if there still is a better way, I'm curious ;)).