Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `grid` visualizer has a mapping `hide_text_name` (bool) that allows to hide the text name. It defaults to false.

## [4.14.0] - 2025-05-14

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public interface GridComponent extends Component {
public static final String MAPPING_ESCAPE_HTML = "escape_html";
public static final String MAPPING_SHOW_NAMESPACE = "show_ns";
public static final String MAPPING_GRID_TEMPLATES = "templates";

public static final String MAPPING_HIDE_TEXT_NAME = "hide_text_name";
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@ public MultipleGridComponent(VisualizerInput visInput, MediaController mediaCont

GridComponent g =
new SingleGridComponent(visInput, mediaController, pdfController, forceToken, text);
Label label = new Label(text.getName());
label.setStyleName("text-name");
boolean hideTextName = ((SingleGridComponent) g).isHidingTextName();
Label label = null;
if (!hideTextName) {
label = new Label(text.getName());
label.setStyleName("text-name");
}
addComponent(g);
addComponent(label);
if (label != null) {
addComponent(label);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ protected boolean isHidingToken() {
return Boolean.parseBoolean(input.getMappings().getOrDefault(MAPPING_HIDE_TOK_KEY, "false"));

}

protected boolean isHidingTextName() {
return Boolean.parseBoolean(input.getMappings().getOrDefault(MAPPING_HIDE_TEXT_NAME, "false"));
}

protected boolean isShowingSpanAnnotations() {
return true;
Expand Down