Skip to content

Commit

Permalink
allow to prevent disabling buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
finity69x2 authored Jul 29, 2021
1 parent 3b9de7b commit 817aa0b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dist/cover-control-button-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class CustomCoverControlRow extends Polymer.Element {
customTheme: false,
reverseButtons: false,
hideStopButton: false,
allowDisablingButtons: true,
width: '41px',
height: '30px',
//openButtonColor: '#43A047',
Expand All @@ -128,6 +129,7 @@ class CustomCoverControlRow extends Polymer.Element {
const custTheme = config.customTheme;
const revButtons = config.reverseButtons;
const hideStpBtn = config.hideStopButton;
const allowDisable = config.allowDisablingButtons;
const buttonWidth = config.width;
const buttonHeight = config.height;
//const opnButtonClr = config.openButtonColor;
Expand Down Expand Up @@ -217,8 +219,8 @@ class CustomCoverControlRow extends Polymer.Element {
if (revButtons) {
this.setProperties({
_stateObj: stateObj,
_leftPosition: opened == 'on',
_rightPosition: closed == 'on',
_leftPosition: (opened == 'on' && allowDisable),
_rightPosition: (closed == 'on' && allowDisable),
_width: buttonwidth,
_height: buttonheight,
_leftColor: opnbtncolor,
Expand All @@ -239,8 +241,8 @@ class CustomCoverControlRow extends Polymer.Element {
} else {
this.setProperties({
_stateObj: stateObj,
_leftPosition: closed == 'on',
_rightPosition: opened == 'on',
_leftPosition: (closed == 'on' && allowDisable),
_rightPosition: (opened == 'on' && allowDisable),
_width: buttonwidth,
_height: buttonheight,
_leftColor: clsbtncolor,
Expand Down

0 comments on commit 817aa0b

Please sign in to comment.