-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
canvas layout page - scaling issue in portrait mode #1475
Comments
I have not really used the scaling option so I probably did not encounter your issue. Your correction seems spot-on. I see no reason why it wouldn't be merged if you submit a PR. |
Thank you for your reply.
But I could never call dev-server at the stated port (for me 8082). |
From what you write, I assume your are using your openHAB raspi to run the development web ui and you try to display it in a browser on another system. By default the development UI (available on port 8082 in your case) does not allow external connections (anything else that the pi). You have to add the following devServer: {
hot: true,
// open: true,
// compress: true,
contentBase: '/www/',
disableHostCheck: true,
host: '0.0.0.0',
... If you restart the development server ( You can also easily run the development UI on another computer and proxy your running openhab install on another machine. |
Thank you so much. It works. |
The problem
In the new canvas layout page when using the scaling option the canvas placement sometimes does not work as expected, e.g. in portrait mode the canvas is placed wrong (To be fair: There's already a warning that styling issues may occur when using the scaling option)
Here you see that the canvas is placed on the right side and you have to pan (although scaling is on). If it would work properly it would just fit the screen.
Your suggestion
One thing I saw in the code is that scaling is computed based on the width of the image.
I think it would be better to consider the width/height-ratio:
main...Larsen-Locke:openhab-webui:main
If I'm not wrong I would start the PR to correct the scaling.
Your environment
runtimeInfo:
version: 3.4.0.M1
buildString: Milestone Build
locale: de-DE
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 11.0.16
javaVendor: Raspbian
osName: Linux
osVersion: 5.10.103-v7l+
osArchitecture: arm
availableProcessors: 4
freeMemory: 37369608
totalMemory: 234881024
startLevel: 100
bindings:
-...
clientInfo:
device:
ios: false
android: true
androidChrome: true
desktop: false
iphone: false
ipod: false
ipad: false
edge: false
ie: false
firefox: false
macos: false
windows: false
cordova: false
phonegap: false
electron: false
nwjs: false
os: android
osVersion: "12"
webView: false
webview: false
standalone: false
pixelRatio: 2.75
prefersColorScheme: light
isSecureContext: false
locationbarVisible: true
menubarVisible: true
navigator:
cookieEnabled: true
deviceMemory: N/A
hardwareConcurrency: 8
language: de-DE
languages:
- de-DE
- en-DE
- de
- en-US
- en
onLine: true
platform: Linux armv8l
screen:
width: 393
height: 851
colorDepth: 24
support:
touch: true
pointerEvents: true
observer: true
passiveListener: true
gestures: false
intersectionObserver: true
themeOptions:
dark: dark
filled: true
pageTransitionAnimation: disabled
bars: light
homeNavbar: default
homeBackground: default
expandableCardAnimation: default
userAgent: Mozilla/5.0 (Linux; Android 12; Pixel 4a) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36
timestamp: 2022-08-23T15:20:16.505Z
The text was updated successfully, but these errors were encountered: