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

Circular Slider Tool acts weird with "odd" scales #172

Closed
KingCruzIII opened this issue Nov 6, 2022 · 2 comments
Closed

Circular Slider Tool acts weird with "odd" scales #172

KingCruzIII opened this issue Nov 6, 2022 · 2 comments
Assignees
Labels
bug Something isn't working tool/circular-slider Circular Slider Tool

Comments

@KingCruzIII
Copy link

Bug report notice

Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!

So make sure your problem is not related to that!

  • [ x] Yes, I'm sure that it is not a configuration mistake

Bug description

When using "odd" scales the tool acts jittery, wont slide past a certain point, or will only bottom/max out.
Example:

  min: 60
  max: 70
  step: 1

will make it only make it want to be 60 or 70.

  min: 50
  max: 70
  step: 1

it wont to below 60

Varous other sets of min/max will also have similar effects.
70/100
15/25

But there are still some that work like you would think
14/24
50/90

To Reproduce

Steps to reproduce the behavior:

  - path: circslider
    title: circslider test
    cards:
      - type: "custom:swiss-army-knife-card"
        entities:
          - entity: climate.thermostat
            attribute: temperature
        aspectratio: 1/1
        layout:
          toolsets:
            # ================================================================
            - toolset: circ-slider-test 
              position:
                cx: 50
                cy: 50
              tools:
                # ------------------------------------------------------------
                - type: circslider
                  position:
                    cx: 50
                    cy: 40
                    radius: 25
                    start_angle: -90
                    end_angle: 90
                    thumb:
                      width: 4
                      height: 4
                    label:
                      placement: "position"
                      cx: 50
                      cy: 50
                  entity_index: 0
                  scale:
                    min: 60
                    max: 70
                    step: 1
                  styles:
                    active:
                      stroke: var(--accent-color)
                      stroke-width: 2em
                      stroke-linecap: round
                    track:
                      stroke: var(--secondary-text-color)
                      fill-opacity: 1
                      stroke-width: 2em
                      stroke-linecap: round
                    thumb:
                      fill: var(--accent-color)
                    capture:
                      fill: none
                    label:
                      text-anchor: middle
                      font-size: 25em
                      font-weight: 500
                      fill: var(--primary-text-color)

Expected behavior

I would expect that you could set any min/max ratio and the slider would not be jittery.

Screenshots

If applicable, add screenshots to help explain your problem.
circslider
circslider2

Desktop browser (please complete the following information):

  • OS: Windows
  • Browser chrome
  • Version 107.0.5304.88

Companion App on Smartphone/Tablet (please complete the following information):

  • Device: Galaxy S20+
  • OS: Android
@KingCruzIII KingCruzIII added the bug Something isn't working label Nov 6, 2022
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

Thank you for creating your first issue for the Swiss Army Knife custom card!

@AmoebeLabs
Copy link
Owner

With PR #187 I hope that these problems are completely gone!

This PR is in milestone 2.4.1: https://github.com/AmoebeLabs/swiss-army-knife-card/milestone/3?closed=1, to be released in may 2023.

@AmoebeLabs AmoebeLabs added this to the Release v2.4.1 milestone Apr 30, 2023
@AmoebeLabs AmoebeLabs self-assigned this Apr 30, 2023
@AmoebeLabs AmoebeLabs added the tool/circular-slider Circular Slider Tool label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tool/circular-slider Circular Slider Tool
Projects
None yet
Development

No branches or pull requests

2 participants