Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(403006): Optimization of sidebar component #11

Merged
merged 1 commit into from
Dec 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<e-items>
<e-item text='Save' tooltipText='Save' prefixIcon='e-ddb-icons e-save'></e-item>
<e-item type='Separator'></e-item>
<e-item text='Load' tooltipText='Load' prefixIcon='e-ddb-icons e-open'>
<!-- <e-item text='Load' tooltipText='Load' prefixIcon='e-ddb-icons e-open'>
<div> <input id="fileupload" type="file" /></div>
</e-item>
</e-item> -->
</e-items>
</ejs-toolbar>
<div> <input id="fileupload" type="file" /></div>
Expand Down
268 changes: 134 additions & 134 deletions src/app/components/workflow-diagram/workflow-diagram.component.scss

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,8 @@ export class WorkflowDiagramComponent implements AfterViewInit{

// Method to add a new node and connect it
public onaddNodeAndConnect([sourceNodeId, newNode]: [string, NodeModel]): void {

this.nodes.push(newNode);
// const newNode = this.createNode(this.newNodeWidth, this.newNodeHeight, htmlContent, newNodeInfo); // Width and height as parameters
// Add the new node to the diagram
this.diagram.addNode(newNode);

// Create a new connector to link the new node to the source node
const newConnectorId = `connector${++this.connectorIdCounter}`;
const newConnector: ConnectorModel = {
Expand All @@ -234,7 +230,6 @@ export class WorkflowDiagramComponent implements AfterViewInit{
type: 'Orthogonal',
style: { strokeColor: '#6BA5D7', strokeWidth: 1 }
};

// Add the connector to the diagram
this.diagram.addConnector(newConnector);
}
Expand Down Expand Up @@ -265,8 +260,6 @@ export class WorkflowDiagramComponent implements AfterViewInit{
const selectedItem = args.item;
const selectedItemId = selectedItem.getAttribute('data-uid');
const selectedItemText = args.item ? args.item.textContent : null;
// Perform actions with the selectedItemId
console.log('Selected Item ID:', selectedItemId);
if (selectedItemId && /^0[1-3]$/.test(selectedItemId)) { // Check if the ID is '01', '02', or '03'
this.sidebarHeader = selectedItemText ? selectedItemText.trim() + ' Block' : '';
}
Expand Down
Loading
Loading