From 760940b37dbd126f86f861fcd95c91e872c64069 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini <16690124+samelhusseini@users.noreply.github.com> Date: Thu, 15 Feb 2018 13:15:24 -0800 Subject: [PATCH] Fix led brightness visuals where it's offset on latest Chrome, Firefox and Edge (#651) --- sim/visuals/microbit.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/sim/visuals/microbit.ts b/sim/visuals/microbit.ts index 3cd4c9b5..1e9d003e 100644 --- a/sim/visuals/microbit.ts +++ b/sim/visuals/microbit.ts @@ -396,6 +396,7 @@ namespace pxsim.visuals { const transfrom = imgbr > 0 ? imgbr / 255 * 0.4 + 0.6 : 0; sel.style.opacity = (opacity / 255) + ""; if (transfrom > 0) { + (sel.style as any).transformBox = 'fill-box'; sel.style.transformOrigin = '50% 50%'; sel.style.transform = `scale(${transfrom})`; }