mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
fix: Remove clickable images from block summary. (#9480)
This commit is contained in:
@@ -33,6 +33,7 @@ import {BlockDragStrategy} from './dragging/block_drag_strategy.js';
|
||||
import type {BlockMove} from './events/events_block_move.js';
|
||||
import {EventType} from './events/type.js';
|
||||
import * as eventUtils from './events/utils.js';
|
||||
import {FieldImage} from './field_image.js';
|
||||
import {FieldLabel} from './field_label.js';
|
||||
import {getFocusManager} from './focus_manager.js';
|
||||
import {IconType} from './icons/icon_types.js';
|
||||
@@ -2059,15 +2060,22 @@ function buildBlockSummary(block: BlockSvg): BlockSummary {
|
||||
): string {
|
||||
return block.inputList
|
||||
.flatMap((input) => {
|
||||
const fields = input.fieldRow.map((field) => {
|
||||
if (!field.isVisible()) return [];
|
||||
// If the block is a full block field, we only want to know if it's an
|
||||
// editable field if we're not directly on it.
|
||||
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
|
||||
inputCount++;
|
||||
}
|
||||
return [field.getText() ?? field.getValue()];
|
||||
});
|
||||
const fields = input.fieldRow
|
||||
.filter((field) => {
|
||||
if (!field.isVisible()) return false;
|
||||
if (field instanceof FieldImage && field.isClickable()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.map((field) => {
|
||||
// If the block is a full block field, we only want to know if it's an
|
||||
// editable field if we're not directly on it.
|
||||
if (field.EDITABLE && !field.isFullBlockField() && !isNestedInput) {
|
||||
inputCount++;
|
||||
}
|
||||
return [field.getText() ?? field.getValue()];
|
||||
});
|
||||
if (
|
||||
input.isVisible() &&
|
||||
input.connection &&
|
||||
|
||||
Reference in New Issue
Block a user