lightswitch: fix tap listener widget assumption
parent
0b96c2f063
commit
8209dcbf28
|
|
@ -5,4 +5,5 @@
|
||||||
0.05: Prevent drawing into app area.
|
0.05: Prevent drawing into app area.
|
||||||
0.06: Fix issue where .draw was being called by reference (not allowing widgets to be hidden)
|
0.06: Fix issue where .draw was being called by reference (not allowing widgets to be hidden)
|
||||||
0.07: Handle the swipe event that is generated when draging to change light intensity, so it doesn't trigger some other swipe handler.
|
0.07: Handle the swipe event that is generated when draging to change light intensity, so it doesn't trigger some other swipe handler.
|
||||||
0.08: Ensure boot code doesn't allocate and leave a gloval variable named 'settings'
|
0.08: Ensure boot code doesn't allocate and leave a gloval variable named 'settings'
|
||||||
|
0.09: Handle lightswitch logic running before its widget has loaded
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ exports = {
|
||||||
// check for double tap and direction
|
// check for double tap and direction
|
||||||
if (data.double) {
|
if (data.double) {
|
||||||
// setup shortcut to this widget or load from storage
|
// setup shortcut to this widget or load from storage
|
||||||
var w = global.WIDGETS ? WIDGETS.lightswitch : Object.assign({
|
var w = global.WIDGETS && WIDGETS.lightswitch || Object.assign({
|
||||||
unlockSide: "",
|
unlockSide: "",
|
||||||
tapSide: "right",
|
tapSide: "right",
|
||||||
tapOn: "always",
|
tapOn: "always",
|
||||||
|
|
@ -31,7 +31,7 @@ exports = {
|
||||||
// function to flash backlight
|
// function to flash backlight
|
||||||
flash: function(tOut) {
|
flash: function(tOut) {
|
||||||
// setup shortcut to this widget or load from storage
|
// setup shortcut to this widget or load from storage
|
||||||
var w = global.WIDGETS ? WIDGETS.lightswitch : Object.assign({
|
var w = global.WIDGETS && WIDGETS.lightswitch || Object.assign({
|
||||||
tOut: 3000,
|
tOut: 3000,
|
||||||
minFlash: 0.2,
|
minFlash: 0.2,
|
||||||
value: 1,
|
value: 1,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "lightswitch",
|
"id": "lightswitch",
|
||||||
"name": "Light Switch Widget",
|
"name": "Light Switch Widget",
|
||||||
"shortName": "Light Switch",
|
"shortName": "Light Switch",
|
||||||
"version": "0.08",
|
"version": "0.09",
|
||||||
"description": "A fast way to switch LCD backlight on/off, change the brightness and show the lock status. All in one widget.",
|
"description": "A fast way to switch LCD backlight on/off, change the brightness and show the lock status. All in one widget.",
|
||||||
"icon": "images/app.png",
|
"icon": "images/app.png",
|
||||||
"screenshots": [
|
"screenshots": [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue