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

Conversation

YashTote
Copy link

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"
https://github.com/sugarlabs/musicblocks/issues/3175

…ette

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 sugarlabs#3175"
@walterbender
Copy link
Member

I am not sure I understand what you are doing here. Wouldn't it make more sense to simply position the new block further to the right without any clicking?

Maybe we should just establish a minimum x position in loadNewBlocks in blocks.js?

@YashTote
Copy link
Author

YashTote commented Feb 15, 2023

By "Click " I mean the selection of the block user will do form the palette, the other option of selection being the drag and drop. The function I used simply places the parent container of the selected blocks at and specified (x,y) position at the end.

I can surely see for changes in the loadNewBlocks by the meantime.

@walterbender
Copy link
Member

Seems that one artifact of this approach is that all of the blocks of a project end up positioned in the same place when you load the project. Also, some blocks -- I don't know why yet -- seem to have their arguments disassociated. Try clicking on the repeat block in the Flow palette.

Screenshot from 2023-02-15 09-34-19

@walterbender
Copy link
Member

This has been fixed in a separate PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't generate blocks behind palette
3 participants