Skip to content

Commit

Permalink
Merge pull request #65 from AmoebeLabs/fix-default-tap-action
Browse files Browse the repository at this point in the history
Fix: default tap action set to "more-info"
  • Loading branch information
AmoebeLabs authored Apr 28, 2023
2 parents cd48cf3 + c314ff4 commit fdc1422
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flex-horseshoe-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ import {
color: 'var(--primary-color)',
}

const DEFAULT_TAP_ACTION = {
action: "more-info"
}

//--

//++ Class ++++++++++
Expand Down Expand Up @@ -890,6 +894,12 @@ import {
horseshoe_state: { ...DEFAULT_HORSESHOE_STATE, ...config.horseshoe_state },
}

for (var entityValue of newConfig.entities) {
if (!entityValue.tap_action) {
entityValue.tap_action = { ...DEFAULT_TAP_ACTION };
}
}

let colorStops = {};
// colorStops[newConfig.horseshoe_scale.min] = newConfig.horseshoe_state.color || '#03a9f4';
if (newConfig.color_stops) {
Expand Down

0 comments on commit fdc1422

Please sign in to comment.