Skip to content

Commit 65c787d

Browse files
committed
replace Blocks.utils.is3dSupported with constant value function
1 parent 0b40daf commit 65c787d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/blocks.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,5 +331,15 @@ export default function (vm) {
331331
return collator.compare(str1, str2);
332332
};
333333

334+
// Blocks wants to know if 3D CSS transforms are supported. The cross
335+
// section of browsers Scratch supports and browsers that support 3D CSS
336+
// transforms will make the return always true.
337+
//
338+
// Shortcutting to true lets us skip an expensive style recalculation when
339+
// first loading the Scratch editor.
340+
ScratchBlocks.utils.is3dSupported = function () {
341+
return true;
342+
};
343+
334344
return ScratchBlocks;
335345
}

0 commit comments

Comments
 (0)