Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks generated from the palette now does not generate behind the palette #3179

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions js/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down