From 65c787d0da130841e6cb577bde93bf2acea70502 Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" <mzgoddard@gmail.com> Date: Wed, 13 Mar 2019 13:34:24 -0400 Subject: [PATCH] replace Blocks.utils.is3dSupported with constant value function --- src/lib/blocks.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/blocks.js b/src/lib/blocks.js index 310f22c23..892218dbe 100644 --- a/src/lib/blocks.js +++ b/src/lib/blocks.js @@ -331,5 +331,15 @@ export default function (vm) { return collator.compare(str1, str2); }; + // Blocks wants to know if 3D CSS transforms are supported. The cross + // section of browsers Scratch supports and browsers that support 3D CSS + // transforms will make the return always true. + // + // Shortcutting to true lets us skip an expensive style recalculation when + // first loading the Scratch editor. + ScratchBlocks.utils.is3dSupported = function () { + return true; + }; + return ScratchBlocks; } -- GitLab