Sie sind nicht angemeldet.

  • »info@totzek.de« ist der Autor dieses Themas

Beiträge: 116

Wohnort: Berlin

Beruf: Panoramafotograf

  • Nachricht senden

1

Donnerstag, 7. Juni 2012, 10:56

100% width or height: change with browsers aspect ratio to cover whole window

hi everybody,


perhaps you know that thing: you want to show a picture, or a movie in 100% of browsersize.
so you use for example 100% of width and set the height to be prop. but now, when the user changes the browsers aspect ratio, areas will appear on the top and on the bottom which are not covered by the plugin. - this doesnt look nice.

i wonder if the scaling could be dynamic?

dynamic in a way that the plugin would be always covering the whole browser? To achieve that the 100% setting must move from width to height for example, depending on the browsers aspect ratio. - can we do that?

best,
jan
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de

2

Donnerstag, 7. Juni 2012, 14:25

A short routine from Klaus he posted lately should do this trick if you change it to your needs >> TOPIC

Best regards
Nupsi

  • »info@totzek.de« ist der Autor dieses Themas

Beiträge: 116

Wohnort: Berlin

Beruf: Panoramafotograf

  • Nachricht senden

3

Freitag, 8. Juni 2012, 16:51

fullsize video? - still not really a solution...

thanks nupsi!
i tried that, but it distorts my plugin, so i removed that code again.

i want to show a video. it must be always covering the full browsersize, without distorting the video or without showing whitespace. you sometimes can see this on websites with images as a background. (example:
http://srobbin.com/jquery-plugins/backstretch/ )

I feel, that this is possible using krpano, but i cant find a way.
- best, Jan
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de

Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von »info@totzek.de« (6. Juli 2012, 18:50)


  • »info@totzek.de« ist der Autor dieses Themas

Beiträge: 116

Wohnort: Berlin

Beruf: Panoramafotograf

  • Nachricht senden

4

Freitag, 6. Juli 2012, 18:50

Ideas for full browser width?

Any ideas...?
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de

5

Montag, 9. Juli 2012, 12:48

Hi,

here:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<plugin name="bg" url="..." align="center" enabled="false" onloaded="bg_automatic_scale()" />
		
<events name="bg_scale" onresize="bg_automatic_scale();" />
		
<action name="bg_automatic_scale">
  if(plugin[bg].loaded,
    div(screenaspect, stagewidth, stageheight);
    div(imageaspect, plugin[bg].imagewidth, plugin[bg].imageheight);
    if(imageaspect GT screenaspect, 
      set(plugin[bg].width,prop); set(plugin[bg].height,100%);
     ,
      set(plugin[bg].width,100%); set(plugin[bg].height,prop);
    );
  );
</action>


best regards,
Klaus

  • »info@totzek.de« ist der Autor dieses Themas

Beiträge: 116

Wohnort: Berlin

Beruf: Panoramafotograf

  • Nachricht senden

6

Montag, 9. Juli 2012, 13:09

Yiieeha!

Hi Klaus!


- Thanks for the perfectly working code, once again!
I should think about creating a shortcode to create "Thank-Klaus-Messages"...

No, honestly: Thanks for that help!
- Jan
Jan Totzek | Panoramafotografie | Berlin
www.panographer.de