Skip to content

Commit ad53716

Browse files
committed
removing the add-button and select-dropdown in the menu because we now have a node-type sidebar for dragging-dropping new nodes on the canvas
1 parent 624a32e commit ad53716

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

libs/app-canvas/src/app/components/navbar-components.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
navBarButton,
1111
navBarIconButton,
1212
navBarIconButtonInnerElement,
13-
navBarPrimaryIconButton,
1413
} from '../consts/classes';
1514
import { DropdownButton } from './dropdown-button';
1615

@@ -68,10 +67,10 @@ export class NavbarComponent extends Component<
6867
if (props.isReadOnly) {
6968
return;
7069
}
70+
// <button class="${navBarPrimaryIconButton}"><span class="${navBarIconButtonInnerElement} icon-add"></span></button>
7171

7272
this.template = createTemplate(
7373
`<div class="inline-flex items-center content-center">
74-
<button class="${navBarPrimaryIconButton}"><span class="${navBarIconButtonInnerElement} icon-add"></span></button>
7574
<button class="${navBarIconButton}"><span class="${navBarIconButtonInnerElement} icon-fit_screen"></span></button>
7675
<button class="${navBarIconButton}"><span class="${navBarIconButtonInnerElement} icon-delete"></span></button>
7776
<div></div>
@@ -115,9 +114,8 @@ export class NavbarComponent extends Component<
115114

116115
if (this.element) {
117116
this.element.remove();
118-
this.addNodeButton = this.element.firstChild as HTMLButtonElement;
119-
this.centerButton = this.addNodeButton
120-
?.nextSibling as HTMLButtonElement;
117+
//this.addNodeButton = this.element.firstChild as HTMLButtonElement;
118+
this.centerButton = this.element.firstChild as HTMLButtonElement;
121119
this.deleteButton = this.centerButton?.nextSibling as HTMLButtonElement;
122120
this.exportButton = this.deleteButton?.nextSibling as HTMLButtonElement;
123121
this.importButton = this.exportButton?.nextSibling as HTMLButtonElement;
@@ -128,7 +126,7 @@ export class NavbarComponent extends Component<
128126
// this.importScriptButton = this.importButton
129127
// ?.nextSibling as HTMLButtonElement;
130128

131-
this.addNodeButton.addEventListener('click', this.onClickAddNode);
129+
//this.addNodeButton.addEventListener('click', this.onClickAddNode);
132130
this.centerButton.addEventListener('click', this.onClickCenter);
133131
this.deleteButton.addEventListener('click', this.onClickDelete);
134132
//this.exportButton.addEventListener('click', this.onClickExport);
@@ -209,7 +207,7 @@ export class NavbarComponent extends Component<
209207
// );
210208

211209
this.renderList.push(
212-
this.addNodeButton,
210+
//this.addNodeButton,
213211
this.centerButton,
214212
this.deleteButton,
215213
this.exportButton,

libs/app-canvas/src/app/flow-app.element.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ export class FlowAppElement extends AppElement<NodeInfo> {
618618
this.resetConnectionSlider(shouldClearExecutionHistory);
619619
}
620620
if (
621-
flowChangeType === FlowChangeType.AddNode ||
621+
//flowChangeType === FlowChangeType.AddNode ||
622622
flowChangeType === FlowChangeType.UpdateNode ||
623623
flowChangeType === FlowChangeType.AddConnection ||
624624
flowChangeType === FlowChangeType.UpdateConnection ||
@@ -1330,19 +1330,19 @@ export class FlowAppElement extends AppElement<NodeInfo> {
13301330
this.rootElement
13311331
);
13321332

1333-
this.selectNodeType = createElement(
1334-
'select',
1335-
{
1336-
type: 'select',
1337-
class: 'p-2 m-2 relative max-w-[220px]', //top-[60px]',
1338-
name: 'select-node-type',
1339-
change: (_event) => {
1340-
//
1341-
},
1342-
},
1343-
menubarElement?.domElement,
1344-
''
1345-
);
1333+
// this.selectNodeType = createElement(
1334+
// 'select',
1335+
// {
1336+
// type: 'select',
1337+
// class: 'p-2 m-2 relative max-w-[220px]', //top-[60px]',
1338+
// name: 'select-node-type',
1339+
// change: (_event) => {
1340+
// //
1341+
// },
1342+
// },
1343+
// menubarElement?.domElement,
1344+
// ''
1345+
// );
13461346
}
13471347
const setupTasksForContainerTaskInDropdown = (
13481348
allowedNodeTasks: string[]

0 commit comments

Comments
 (0)