From b0a84dc83ee29b4f78ab0218e92399a686dea6bc Mon Sep 17 00:00:00 2001 From: YashTote Date: Tue, 14 Feb 2023 17:58:43 +0530 Subject: [PATCH] Blocks generated from the palette now does not generate behid the palette The new blocks now generated by using the palette now does not generate behind the palette. Gets generated at an other location on the canvas after clicked "Fixes #3175" --- js/blocks.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/blocks.js b/js/blocks.js index 4808a5f035..5935e481c3 100644 --- a/js/blocks.js +++ b/js/blocks.js @@ -3098,6 +3098,13 @@ class Blocks { myBlock.container.snapToPixelEnabled = true; myBlock.container.x = 0; myBlock.container.y = 0; + + // All the new generated block graphics have this default position when clicked. + requestAnimationFrame(function() { + myBlock.container.x = 550; + myBlock.container.y = 250; + },0); + /** and we need to load the images into the container. */ myBlock.imageLoad();