I purchased a new tablet, whose screen resolution is 2.5k. Working on a project, I have it open through tour_testingserver.exe, to verify the changes on each device. I have a layer that needs a different scale on each device, desktop, mobile, tablet. When you type scale.tablet="xvalue", it takes the value that the desktop has,
not the one I specified for the tablet. Apparently it takes the tablet like a desktop computer. What should be done in that case?
Tablet screen taken as a desktop screen
-
-
scale.tablet="xvalue" are you trying to use a variable? --> scale.tablet="get:xvalue"
-
I just want to show that X is any value.
I really meant scale.tablet="0.7" -
- Official Post
Hi,
it also depends if that tablet even can be detected as tablet - and that depends on the actual tablet and browser:
- iPad's typically can be detected as tablets (even in Desktop mode)
- Android tablets typically too (but probably not in Desktop mode)
- Windows tablets typically can't be detected as tablets.
Best regards,
Klaus -
It is a Lenovo ideapad tablet, I tried it in chrome, Mozilla and Opera, always with the same results
-
As Klaus said Windows tablets can't be detected as tablets.
You should use the reactive API : https://krpano.com/releases/1.23/examples/#layers_responsive -
Yes jeromebg, the scale item can be managed reactively. I gave the example of the scale, to illustrate the fact that the tablet is taken by krpano com desktop. But that is not the only case, I have actions and also events that must result in different behaviors for each device
-
<layer name="info3" keep="true" url="iconskin/info.png" align="center" x="0" y="20" alpha="1" visible="true" scale.desktop="3" scale.mobile="4"
onhover=""
onclick.desktop=""
onclick.mobile=""
/>
<layer name="info4" keep="true" url="iconskin/info.png" bgcolor="0x000000" bgalpha="1.0" align="center" x="100" y="20" alpha="1" visible="true" scale="3" scale.mobile="1"
onhover=""
onclick.desktop=""
onclick.mobile=""
/>
<layer name="info5" keep="true" url="iconskin/info.png" align="center" x="-100" y="20" alpha="1" visible="true" scale.desktop="5" scale.tablet="1" scale.mobile="2"
onhover=""
onclick.desktop=""
onclick.mobile=""
/> -
Perhaps it is an option to divert by operating system? Or device touch? Or device browser?
If device is desktop and etc..(?)
🍎 /mac here.
Tuur

-
-
No, it doesn't work
-
What doesn't work ?
Open your browser console;) -
Sorry, I was checking it in another open project. I'm already seeing the device info. Thanks
-
I edit this post, now showing the real values that the tablet console returns. the previous ones were those of the PC
Object
air: false all: true
android: false
androidstock: false
applewebkit: false
blackberry: false
browser: {useragent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36…KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', platform: 'Linux armv81', domain: null, location: 'http://192.168.1.210:63961/', protocol: 'http', …}
checkSupport: ƒ (h)
chrome: true
chromemobile: false
chromeversion: 147
css3d: true
depthmapsupport: true
desktop: true
dommousescroll: false
edge: false
firefox: false
flash: false
fractionalscaling: false
fullscreensupport: true
gesturedevice: true
getViewportScale: ƒ m()
gl: {width: 2560, height: 1330, pixelratio: 2}
handheld: false
hidpi: false
html: true
html5: true
ie: false
iframe: false
infoString: "Desktop - Chrome 147.0"
ios: false
iosdesktop: false
iosversion: 0
ipad: false
iphone: false
ipod: false
istouchevent: false
linux: true
mac: false
maxtexturesize: 8192
mobile: false
mobilevr: false
mouse: true
multiressupport: true
newedge: false
normal: true
pagescale: 1
panovideosupport: true
pixelratio: 2
pointerEvents: true
realDesktop: true
retina: false
safari: false
screen: {width: 1280, height: 800, orientation: 90}
silk: false
simulator: false
standalone: false
tablet: false
topAccess: true
touch: true
touchdevice: true
touchdeviceNS: true
touchsupport: true
webgl: true
webgl2: true
webkit: true
webkitversion: 537.36
window: {width: 1280, height: 665}
windows: false[[Prototype]]: Object
-
It is NOT mobile
It is NOT a tablet
It is NOT a handheld
But it DOES have touch
Krpano is classifying your device as:“Desktop with touch screen”
The tablet is seen as:PC (desktop)
with touch
not as real mobile device
browser: Linux armv81 - This prevents mobile detection -
Is there any possibility of a solution?
-
did you tried
and/or
already, as i mentioned before?
krpano.com - Documentation - XML Reference
Tuur
-
Of course I have tried, but touch is also mobile, if I need a mobile phone to be different from a tablet, I can't get it
-
The other thing, consequently, is that what in the past was configured as a tablet, today in this type of new tablets, will show a different behavior as it was conceived in the past.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!