You are not logged in.

Vishwas

Beginner

  • "Vishwas" started this thread

Posts: 33

Location: India

  • Send private message

1

Monday, June 20th 2016, 6:37am

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!

Vishwas

Beginner

  • "Vishwas" started this thread

Posts: 33

Location: India

  • Send private message

2

Tuesday, June 21st 2016, 7:26am

Any suggestions or hints ppl?

3

Wednesday, June 22nd 2016, 9:58pm

Hi,

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

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

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

Source code

1
2
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:
http://krpano.com/docu/html/#mobilescale

Best regards,
Klaus

4

Friday, December 18th 2020, 10:35am

Also want to implement this but how?

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" />