Skip to content
Permalink
Browse files
Bangle.js: Fix issue where minified E.showMenu was creating a global …
…var called 'c'
  • Loading branch information
gfwilliams committed Oct 26, 2021
1 parent c118a9f commit 3814bedff6a4b4457940f1cd41ffbe445c7e8425
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
@@ -63,6 +63,7 @@
Bangle.js: widgets are now sorted by .sortorder
While and for loop conditions now use Expression, not AssignmentExpression (eg. while(0,0) is fine) (fix #2068)
Bangle.js2: Fix 'stuck' bottom row of pixels if scrolling downwards with g.scroll(0,1)
Bangle.js: Fix issue where minified E.showMenu was creating a global var called 'c'

2v10 : Bangle.js: Improved HRM calculations - swapped autocorrelation for bandpass filter
Bangle.js: Significantly improved step counting algorithm using bandpass filter (fix #1846)
@@ -127,18 +127,19 @@
}
},
move : function(dir) {
if (l.selectEdit) {
var item = l.selectEdit;
var item = l.selectEdit;
if (item) {
item = l.selectEdit;
item.value -= (dir||1)*(item.step||1);
if (item.min!==undefined && item.value<item.min) item.value = item.min;
if (item.max!==undefined && item.value>item.max) item.value = item.max;
if (item.onchange) item.onchange(item.value);
l.draw(options.selected,options.selected);
} else {
var a=options.selected;
var lastSelected=options.selected;
options.selected = (dir+options.selected)%menuItems.length;
if (options.selected<0) options.selected += menuItems.length;
l.draw(Math.min(a,options.selected), Math.max(a,options.selected));
l.draw(Math.min(lastSelected,options.selected), Math.max(lastSelected,options.selected));
}
}
};
@@ -148,4 +149,4 @@
else l.select();
});
return l;
})
})

Some generated files are not rendered by default. Learn more.

@@ -115,8 +115,8 @@
}
},
move : function(dir) {
if (l.selectEdit) {
var item = l.selectEdit;
var item = l.selectEdit;
if (item) {
item.value -= (dir||1)*(item.step||1);
if (item.min!==undefined && item.value<item.min) item.value = item.min;
if (item.max!==undefined && item.value>item.max) item.value = item.max;
@@ -95,18 +95,18 @@
}
},
move : function(dir) {
if (l.selectEdit) {
var item = l.selectEdit;
var item = l.selectEdit
if (item) {
item.value -= (dir||1)*(item.step||1);
if (item.min!==undefined && item.value<item.min) item.value = item.min;
if (item.max!==undefined && item.value>item.max) item.value = item.max;
if (item.onchange) item.onchange(item.value);
l.draw(options.selected,options.selected);
} else {
var a=options.selected;
var lastSelected=options.selected;
options.selected = (dir+options.selected)%menuItems.length;
if (options.selected<0) options.selected += menuItems.length;
l.draw(Math.min(a,options.selected), Math.max(a,options.selected));
l.draw(Math.min(lastSelected,options.selected), Math.max(lastSelected,options.selected));
}
}
};

Some generated files are not rendered by default. Learn more.

0 comments on commit 3814bed

Please sign in to comment.