File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 602602
603603 function addBtn ( i , p , t ) {
604604 var b = gId ( "btns" ) ;
605- var c = b . innerHTML ;
606605 var s = chrID ( i ) ;
607- c + = `<div id="btn${ i } ">#${ i } GPIO: <input type="number" name="BT${ s } " onchange="UI()" min="-1" max="${ d . max_gpio } " class="xs" value="${ p } ">` ;
606+ var c = `<div id="btn${ i } ">#${ i } GPIO: <input type="number" name="BT${ s } " onchange="UI()" min="-1" max="${ d . max_gpio } " class="xs" value="${ p } ">` ;
608607 c += ` <select name="BE${ s } ">`
609608 c += `<option value="0" ${ t == 0 ?"selected" :"" } >Disabled</option>` ;
610609 c += `<option value="2" ${ t == 2 ?"selected" :"" } >Pushbutton</option>` ;
617616 c += `<option value="9" ${ t == 9 ?"selected" :"" } >Touch (switch)</option>` ;
618617 c += `</select>` ;
619618 c += `<span style="cursor: pointer;" onclick="off('BT${ s } ')"> ✕</span><br></div>` ;
620- b . innerHTML = c ;
619+ b . insertAdjacentHTML ( "beforeend" , c ) ;
621620 btnBtn ( ) ;
621+ pinDropdowns ( ) ;
622622 UI ( ) ;
623623 }
624624 function remBtn ( ) {
625625 var b = gId ( "btns" ) ;
626626 if ( b . children . length <= 1 ) return ;
627627 b . lastElementChild . remove ( ) ;
628628 btnBtn ( ) ;
629+ pinDropdowns ( ) ;
629630 UI ( ) ;
630631 }
631632 function btnBtn ( ) {
You can’t perform that action at this time.
0 commit comments