Fix issue with multi digit numbers not scrolling all the way off screen as is the case on the physical pxt.
This commit is contained in:
parent
c6ed665f84
commit
65594842fc
@ -725,7 +725,8 @@ namespace pxsim.ImageMethods {
|
|||||||
board().animationQ.enqueue({
|
board().animationQ.enqueue({
|
||||||
interval: interval,
|
interval: interval,
|
||||||
frame: () => {
|
frame: () => {
|
||||||
if (off >= leds.width || off < 0) return false;
|
//TODO: support right to left.
|
||||||
|
if (off >= leds.width + 5 || off < 0) return false;
|
||||||
stride > 0 ? display.shiftLeft(stride) : display.shiftRight(-stride);
|
stride > 0 ? display.shiftLeft(stride) : display.shiftRight(-stride);
|
||||||
let c = Math.min(stride, leds.width - off);
|
let c = Math.min(stride, leds.width - off);
|
||||||
leds.copyTo(off, c, display, 5 - stride)
|
leds.copyTo(off, c, display, 5 - stride)
|
||||||
|
Loading…
Reference in New Issue
Block a user