feat(execution): add right-side zoom controls

This commit is contained in:
Lucio Lelii 2026-09-30 10:47:10 +02:00
parent a37eacb238
commit 5216116a14
3 changed files with 19 additions and 2 deletions

View File

@ -137,6 +137,12 @@
left: 202px;
}
/* The execution canvas is read-only, but its graph remains navigable; keep its zoom beside it. */
.rete-editor-toolbar--right {
right: 12px;
left: auto;
}
.rete-editor-toolbar-group {
position: relative;
display: inline-flex;

View File

@ -47,8 +47,11 @@
}
</div>
}
@if (!readonly()) {
<div class="rete-editor-toolbar" [class.rete-editor-toolbar--with-lanes]="swimlanesEnabled && sortedLanes().length">
@if (!readonly() || nodeView() === 'execution') {
<div
class="rete-editor-toolbar"
[class.rete-editor-toolbar--with-lanes]="swimlanesEnabled && sortedLanes().length"
[class.rete-editor-toolbar--right]="readonly() && nodeView() === 'execution'">
<section class="rete-editor-toolbar-group" aria-label="Zoom controls">
<div class="rete-editor-toolbar-legend">Zoom</div>
<button

View File

@ -71,6 +71,14 @@ describe('ReteEditor', () => {
expect(component).toBeTruthy();
});
it('keeps zoom controls available on the right in a read-only execution graph', () => {
fixture.componentRef.setInput('readonly', true);
fixture.componentRef.setInput('nodeView', 'execution');
fixture.detectChanges();
expect((fixture.nativeElement as HTMLElement).querySelector('.rete-editor-toolbar--right')).not.toBeNull();
});
it('brings both endpoints of a selected connection above unrelated nodes', async () => {
const source = document.createElement('div');
const target = document.createElement('div');