mobile view scaling issue

  • Hello people,

    I am using krpano-1.19-pr4-win and was trying out some of the features.

    A rough draft is here, it is just a tryout so not pretty *g*

    http://epsonaut.com/wp-content/uploads/2016/test/tour.html

    while this looks OK on desktop, I am not able to handle the scaling required for mobile view. Especially the floorplan & the combobox look very huge and cover the entire view. I have seen some amazing tours created in which these elements automatically resize as per the screen but I just don't know how to do this, any help, code snippet or reference would be appreciated. Please let me know if you need any more information. Thanks in advance!

  • Hi,

    see here:
    https://krpano.com/docu/xml/#devices

    and here:
    https://krpano.com/docu/xml/#devicechecksforattributes

    by this you could set special values for some devices - e.g. a smaller scale for mobile:

    Code
    scale.normal="1.0"
    scale.mobile="0.5"

    'normal' will cover desktop and tablets and 'mobile' will be for mobile devices.

    Alternatively you could also set a different global scale for mobile devices - e.g. via the mobilescale setting in the html file:
    https://krpano.com/docu/html/#mobilescale

    Best regards,
    Klaus

  • Found the thread but just cant get it right.
    The post is a few years old and maybe something changed? The documentation is still the same but cant get it right.

    My issue is a image. I want it 1.0 on desketop and 0.5 on mobile because otherwise the image is way outside mobilewindow.

    I also tried to set numbers like: scale.normal="300" and scale.mobile="150" this ic actually changing the mobile but its proportions are weird so that not good either..also tride % nothing works. Any solutions? *smile*

    This is my code:


    <plugin
    name="intro"
    url="img/intro.png"
    align="center"
    keep="true"
    onloaded="showintro();"
    onclick="hideintro();"
    zorder="4000"
    scale.normal="1.0"
    scale.mobile="0.5"
    handcursor="false"


    />

    <plugin
    name="buttonToShowIntroAgain"
    url="img/question-info.svg"
    keep="true"
    onclick="showintro();"
    align="top-right"
    width="50"
    height="50"
    x="30"
    y="30"
    />

    <action name="showintro">
    set(plugin[intro].enabled,true);
    tween(plugin[intro].alpha, 1, 0.5, default);

    </action>

    <action name="hideintro">
    if(plugin[intro].enabled,
    set(plugin[intro].enabled,false);
    tween(plugin[intro].alpha, 0.0, 0.5, default);
    );
    </action>

    also in my vtourskin.xml I have this line:

    <krpano stagescale="calc:stagescale * 2" if="stagescale LT 1.0" devices="mobile" />

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!