feat(execution): add right-side zoom controls
This commit is contained in:
parent
a37eacb238
commit
5216116a14
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue