new approach for widescreen presentation

  • hi!
    when presenting a widesceen panorama its important to get an overview over the whole scenery -
    on the other hand fullscreen is nice...
    there are ways via thumbnail picture, but i wanted to use the pano as preview...
    so i found a way to do it in krpano...
    here is a example...

    by the way: is there a method to scale the preview by percent in the html, and find automatically the ratio of height and width?

  • Hi machart,

    Great pano and design; simple and beautiful... *thumbup*

    Zitat

    by the way: is there a method to scale the preview by percent in the html, and find automatically the ratio of height and width?

    Sure, there is a way to find automatically the ratio of height and width in the html using javascript ( I have not tried to find how *whistling* , perhaps later )...

    But I was thinking about your request using new features of krpano that I have read from a recent thread from Klaus: 1.0.8 beta 9 - fovtype setting

    So your request was the occasion to learn how works the example of Klaus, trying to get a code to resolve your request *smile* ... And I made a code that partially match with your needs without using extra html code like table and div style, only with features of Krpano...

    So, the html code is the "normal"... and the xml is as follow:


    Some notes:

    • In line 16: here you can set some parameters to the action define_area_size() to make the area looks as you need. Those parameter are image_width, image_height and margin in pixels (no % for the moment)
    • also, it seems there is no border attribute for the area node. So I made the border using 4 plugings to make the 4 sides of the border with a 2x2.png.


    Here is a link to see the result: http://andorra360.com/test/ForumKrpano/machart/area.html
    Try to resize the browser window .... in his width... and in his height... the panos area resizes accordingly respecting the aspect ratio.

    Hope this code can be useful.

    SAlut.

  • hello, michel!

    thanks alot for your thoughts! you are genius!

    i copied the code and a border.png and tried it: the resizing works great!
    the only thing is: when using the fullscreen button, it stays in the same borders... thats an interesting thing too, but was not meant in this case... *unsure*

  • Hi machart,

    Zitat

    thanks alot for your thoughts! you are genius!

    Thank you *smile* but I am only an Krpano enthusiast user like you *wink* ... The only genius here is KLAUS *thumbup* ... We are lucky to have this guy on the planet *g* do not you think so ?

    Zitat

    the only thing is: when using the fullscreen button, it stays in the same borders...

    I have modified the code to take in account your needs... like this:


    I have some doubt about the way I have used to reset the area.... It works but perhaps there is an simple way to do... I am going to post a new thread about this...
    Give it a try *wink* ....

    SAlut.

  • Hi machart,

    Great *thumbup* .
    Only one notice *wink* ... You have set the image width and height as 500 and 150... If I am not on mistake, on your first attempt you have set the <div> width and height to 960 and 320... so the image aspect ratio is 3:1.
    I suggest you to try to set the image width and height as follow:

    Code
    define_area_size(960,320,30);
    or
    define_area_size(3,1,30);


    Doing this way, you respect the image aspect ratio and your preview will display the full image *smile* .

    SAlut.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!