11-08-2017 13:26 - edited 11-08-2017 13:27
11-08-2017 13:26 - edited 11-08-2017 13:27
Combo widget is set up in widgets. 60x60 png image is in resources folder.
Here is UI portion
<use href="#combo-button-upper-right" fill="fb-red" id="btn-tr"> <set href="combo-button-icon" attributeName="href" to="reverse.png"/> <set href="combo-button-icon-press" attributeName="href" to="reverse.png"/> </use>
Here is JS portion:
let reverseBtn = document.getElementById('btn-tr'); reverseBtn.onactivate = function(e) { console.log('clicked'); messaging.peerSocket.send(trainData); }
Button shows fine, but upon pressing, the style is correct but JS is not picking up the event. No errors, just no feedback at all.
11-08-2017 15:18
11-08-2017 15:18
Update:
My apologies, I thought combo buttons were to be used with the physical buttons. When I press the top right button, the clicked icon would appear but the event wouldn't trigger. When I actually press the on screen button, the event works. Is there another method to utilize the hardware buttons?