-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: Always draw dragged blocks atop others in the workspace. #6874
Conversation
This no longer applies because #6758 was reverted |
const draggingBlock = this.workspace | ||
.getCanvas() | ||
.querySelector('.blocklyDragging'); | ||
if (draggingBlock) { | ||
this.workspace.getCanvas().insertBefore(svgRoot, draggingBlock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gonfunko do you remember what case this was handling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not offhand :/ Judging by the comment maybe it's when a block is disconnected from a stack?
The basics
npm run format
andnpm run lint
The details
Resolves
Fixes #6852
Proposed Changes
When blocks are dragged, bring them to the front, and update
setParent
to insert blocks before the block being dragged, if any, when removing it from its parent.Behavior Before Change
Blocks would occassionally appear behind other blocks when being dragged.
Behavior After Change
Blocks being dragged appear atop all other blocks.
Reason for Changes
Fixes a regression introduced in #6758.