Skip to content

Exclude image field from positioning fix #1051

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

Merged
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
8 changes: 5 additions & 3 deletions core/block_render_svg_vertical.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,11 @@ Blockly.BlockSvg.prototype.renderFields_ =
if (!root) {
continue;
}
// In blocks with a notch, non-label fields should be bumped to a min X,
// to avoid overlapping with the notch.
if (this.previousConnection && !(field instanceof Blockly.FieldLabel)) {
// In blocks with a notch, fields should be bumped to a min X,
// to avoid overlapping with the notch. Label and image fields are
// excluded.
if (this.previousConnection && !(field instanceof Blockly.FieldLabel) &&
!(field instanceof Blockly.FieldImage)) {
cursorX = this.RTL ?
Math.min(cursorX, -Blockly.BlockSvg.INPUT_AND_FIELD_MIN_X) :
Math.max(cursorX, Blockly.BlockSvg.INPUT_AND_FIELD_MIN_X);
Expand Down