diff --git a/ChangeLog b/ChangeLog index 0d5d7c9d9..0e13548a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,7 @@ Fix for regression after #2547 fix (left hand operand of maths with a valueOf method) X.on now allocates a new array for each new handler added, stops new handlers being called for the event that's currently being handled (#2559) RegExp: add optimisation for RegExp that is simply checking if a string ends with something + Bangle.js: .setUI now only clears back widget if it hasn't been hidden by widget_utils 2v24 : Bangle.js2: Add 'Bangle.touchRd()', 'Bangle.touchWr()' Bangle.js2: After Bangle.showTestScreen, put Bangle.js into a hard off state (not soft off) diff --git a/libs/js/banglejs/Bangle_setUI_F18.js b/libs/js/banglejs/Bangle_setUI_F18.js index 4a5894425..6678a39dc 100644 --- a/libs/js/banglejs/Bangle_setUI_F18.js +++ b/libs/js/banglejs/Bangle_setUI_F18.js @@ -106,9 +106,11 @@ area:"tl", width:24, draw:e=>g.reset().setColor("#f00").drawImage(atob("GBiBAAAYAAH/gAf/4A//8B//+D///D///H/P/n+H/n8P/n4f/vwAP/wAP34f/n8P/n+H/n/P/j///D///B//+A//8Af/4AH/gAAYAA=="),e.x,e.y), remove:(noclear)=>{ + var w = WIDGETS.back; + if (w.area!="tl") noclear=true; // area="" is set by widget_utils.hide, so avoid drawing if (btnWatch) clearWatch(btnWatch); Bangle.removeListener("touch", touchHandler); - if (!noclear) g.reset().clearRect({x:WIDGETS.back.x, y:WIDGETS.back.y, w:24,h:24}); + if (!noclear) g.reset().clearRect({x:w.x, y:w.y, w:24,h:24}); delete WIDGETS.back; if (!noclear) Bangle.drawWidgets(); } diff --git a/libs/js/banglejs/Bangle_setUI_F18.min.js b/libs/js/banglejs/Bangle_setUI_F18.min.js index 4ed75b868..2396162d8 100644 Binary files a/libs/js/banglejs/Bangle_setUI_F18.min.js and b/libs/js/banglejs/Bangle_setUI_F18.min.js differ diff --git a/libs/js/banglejs/Bangle_setUI_Q3.js b/libs/js/banglejs/Bangle_setUI_Q3.js index a6453da04..449fbd506 100644 --- a/libs/js/banglejs/Bangle_setUI_Q3.js +++ b/libs/js/banglejs/Bangle_setUI_Q3.js @@ -139,9 +139,11 @@ area:"tl", width:24, draw:e=>g.reset().setColor("#f00").drawImage(atob("GBiBAAAYAAH/gAf/4A//8B//+D///D///H/P/n+H/n8P/n4f/vwAP/wAP34f/n8P/n+H/n/P/j///D///B//+A//8Af/4AH/gAAYAA=="),e.x,e.y), remove:(noclear)=>{ + var w = WIDGETS.back; + if (w.area!="tl") noclear=true; // area="" is set by widget_utils.hide, so avoid drawing if (btnWatch) clearWatch(btnWatch); Bangle.removeListener("touch", touchHandler); - if (!noclear) g.reset().clearRect({x:WIDGETS.back.x, y:WIDGETS.back.y, w:24,h:24}); + if (!noclear) g.reset().clearRect({x:w.x, y:w.y, w:24,h:24}); delete WIDGETS.back; if (!noclear) Bangle.drawWidgets(); } diff --git a/libs/js/banglejs/Bangle_setUI_Q3.min.js b/libs/js/banglejs/Bangle_setUI_Q3.min.js index b02ee2e58..522ea8fa5 100644 Binary files a/libs/js/banglejs/Bangle_setUI_Q3.min.js and b/libs/js/banglejs/Bangle_setUI_Q3.min.js differ