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

Scale map relatively to parent card (picture-elements example) #95

Open
earglass opened this issue Sep 4, 2021 · 2 comments
Open

Scale map relatively to parent card (picture-elements example) #95

earglass opened this issue Sep 4, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@earglass
Copy link

earglass commented Sep 4, 2021

When combining with picture elements, map gets weird between devices. I can position it in the center using style top & left of picture-elements card but it scales differently if card changes size. Any ideas on how to achieve relative width & height to scale together with card?

I tried map_scale, min_height with ratio, cropping, nothing seems to show correctly on both web app and mobile - screens below.

  • type: custom:valetudo-map-card
    entity: camera.map_data
    show_floor: false
    background_color: transparent
    rotate: 90
    min_height: 1.4144w
    map_scale: 2
    crop:
    top: 0
    bottom: 0
    left: 25
    right: -70
    segment_opacity: 0
    path_color: '#00FF00'
    path_opacity: 0.4
    wall_opacity: 1
    show_no_go_areas: false
    style:
    top: 50%
    left: 50%

image
image

@TheLastProject TheLastProject added enhancement New feature or request help wanted Extra attention is needed labels Sep 4, 2021
@datmospro
Copy link

Looking for that too!!

@g0r3
Copy link

g0r3 commented Jan 6, 2022

I'm here for that too.

It looks really weird if you either have to fit it on to your phone screen, but then it looks tiny on your computer screen. Or you fit it on to your computer screen and it will be cropped on the phone screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants