Skip to content

fix(fixed-position): Use the position as the position on the whell#14

Open
avano wants to merge 1 commit intolsmarsden:mainfrom
avano:fixed-position
Open

fix(fixed-position): Use the position as the position on the whell#14
avano wants to merge 1 commit intolsmarsden:mainfrom
avano:fixed-position

Conversation

@avano
Copy link

@avano avano commented Jan 12, 2026

Hi!

it seemed to me that the fixed-position did not work correctly, or at least not how would I interpret the fixed-position setting.

One issue is that buttonConfig.position = availablePositions[index]; does not modify the buttonConfig object so the position stays unset and the other is that the applyFixedPositionLayout calculates the wheel position based on the index and not position.

Consider this button card:

type: custom:bubble-card
card_type: button
button_type: name
sub_button:
  main:
    - icon: mdi:numeric-4-box
      content_layout: icon-left
    - icon: mdi:help
    - icon: mdi:numeric-6-box
  bottom: []
icon: mdi:test-tube
show_name: false
grid_options:
  columns: 6
  rows: auto
name: ""
modules:
  - sub_button_wheel
sub_button_wheel:
  - wheel_opener: main
    close_on_sub_button_click: true
    animation_options:
      wheel_animation: staggered-scale
    wheel_buttons:
      "0":
        sub_button: "1"
        position: 4
      "1":
        sub_button: "2"
      "2":
        sub_button: "3"
        position: 6
    layout_options:
      wheel_layout: fixed-position

the buttons are displayed this way:
image

where with this PR the buttons are displayed this way:
image

should also work with double ring (size 2 in this example):
image

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