Sie sind nicht angemeldet.

360boy

Fortgeschrittener

  • »360boy« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

1

Mittwoch, 7. August 2013, 23:04

Get pixel size for a width="prop" layer

Greetings fellow krpanoers,

I'm working with a dynamically sized layer by height="80%" and width="prop". As I have another element inside it they need to be dynamically arranged when user resizes the window but I need to know the actual pixel width & height of this layer.

I'm trying by the traditional get(layer[name].width) but all I get is that "80%" or "prop" and not the actual pixel value. ¿Any idea of how to do this?

Klaus, ¿It won't be better to replace this value with the actual pixel size once krpano is loaded?

Thanks in advance.

Luis

2

Donnerstag, 8. August 2013, 08:33

Hi Luis,

you may want to look up "pixelwidth" in the docu *smile*

LG
Nupsi

3

Donnerstag, 8. August 2013, 14:48

Klaus, ¿It won't be better to replace this value with the actual pixel size once krpano is loaded?
No, when replacing the original % or prop values by the calculated values, then any further resizing will not work anymore.
Like Nupsi already said there are the pixelwidth and pixelheight variables for that.

Best regards,
Klaus

360boy

Fortgeschrittener

  • »360boy« ist der Autor dieses Themas

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

4

Donnerstag, 8. August 2013, 20:20

Thanks Nupsi, I didn't know pixelwidth pixelheight parameters.

And Klaus, completelly agree, with those parameters then it doesn't make sense to replace % and prop with pixel values.

Thank you both. *thumbsup*

Best regards

Luis