Skip to content
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

Add max-width to svg #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noxhirsch
Copy link
Contributor

All uploaded images should not exceed the maximum width of 800px as stated below in the checklist. But in the UI, very wide images get upscaled to full browser width instead of being limited to 800px.
I solved the problem for me by adding max-width to #switch-image > svg in switch_manager_panel.js. The result you can see in the screenshot below. But I don't know if that is the cleanest solution and I also don't know if changing that in the ts file is correct. If you have a better solution, feel free to close this PR.

Before:
before
After:
image

Blueprint Checklist

  • You viewed the README and conformed to the naming conventions
  • You ordered the actions as stated in the README action order
  • All filenames are lowercase and uses '-' for spaces and not '_' while using {service-name}-{switch-name-or-type}.yaml format
  • Images are png
  • Image backgrounds are transparent and is cropped to the device boundries
  • Images has a maximum width of 800px and maximum height of 500px
  • There are no missing buttons or actions
  • Your integration/service is running on the latest version
  • You have tested your blueprints and made sure each button and action works

Zigbee2MQTT

  • (older devices) You have ensured legacy is off/false for the device in the Z2M devices Settings (specific) page and that your actions matches those with legacy off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant