diff --git a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts index d397704d101..e6cb90d1a32 100644 --- a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts +++ b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts @@ -1777,24 +1777,6 @@ describe("WorkflowEditorComponent link breakpoints", () => { expect(wrapper.multiSelect).toBe(true); }); - - it("shows and hides the tool as the breakpoint streams ask", () => { - // These two streams are how a link that already has a breakpoint keeps its marker visible after - // the cursor leaves it. - const { linkID, view } = withLink(); - const wrapper = workflowActionService.getJointGraphWrapper(); - const show = vi.spyOn(view, "showTools"); - const hide = vi.spyOn(view, "hideTools"); - - (wrapper as any).jointLinkBreakpointShowStream.next({ linkID }); - (wrapper as any).jointLinkBreakpointHideStream.next({ linkID }); - - expect(show).toHaveBeenCalledTimes(1); - expect(hide).toHaveBeenCalledTimes(1); - // Order matters, otherwise a handler pair wired to each other's stream passes: both would - // still be called once, just for the opposite reason. - expect(show.mock.invocationCallOrder[0]).toBeLessThan(hide.mock.invocationCallOrder[0]); - }); }); /** diff --git a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts index 92264762563..c8919a50238 100644 --- a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts +++ b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts @@ -1553,8 +1553,6 @@ export class WorkflowEditorComponent implements OnInit, AfterViewInit, OnDestroy /** * When the cursor leaves a link, the delete button disappears. - * If there is no breakpoint present on that link, the breakpoint button also disappears, - * otherwise, the breakpoint button is not changed. */ fromJointPaperEvent(this.paper, "link:mouseleave") .pipe(map(value => value[0])) @@ -1562,10 +1560,7 @@ export class WorkflowEditorComponent implements OnInit, AfterViewInit, OnDestroy .subscribe(elementView => { // ensure that the link element exists if (this.paper.getModelById(elementView.model.id)) { - const LinksWithBreakpoint = this.wrapper.getLinkIDsWithBreakpoint(); - if (!LinksWithBreakpoint.includes(elementView.model.id.toString())) { - this.paper.getModelById(elementView.model.id).findView(this.paper).hideTools(); - } + this.paper.getModelById(elementView.model.id).findView(this.paper).hideTools(); this.paper.getModelById(elementView.model.id).attr({ ".tool-remove": { display: "none" }, }); @@ -1580,7 +1575,6 @@ export class WorkflowEditorComponent implements OnInit, AfterViewInit, OnDestroy this.handleLinkBreakpointToolAttachment(); this.handleLinkBreakpointButtonClick(); this.handleLinkBreakpointHighlightEvents(); - this.handleLinkBreakpointToggleEvents(); } // when a link is added, append a breakpoint link-tool to its LinkView @@ -1669,25 +1663,6 @@ export class WorkflowEditorComponent implements OnInit, AfterViewInit, OnDestroy }); } - /** - * show/hide the breakpoint button according to the observable value received - */ - private handleLinkBreakpointToggleEvents(): void { - this.wrapper - .getLinkBreakpointShowStream() - .pipe(this.wrapper.jointGraphContext.bufferWhileAsync, untilDestroyed(this)) - .subscribe(linkID => { - this.paper.getModelById(linkID.linkID).findView(this.paper).showTools(); - }); - - this.wrapper - .getLinkBreakpointHideStream() - .pipe(this.wrapper.jointGraphContext.bufferWhileAsync, untilDestroyed(this)) - .subscribe(linkID => { - this.paper.getModelById(linkID.linkID).findView(this.paper).hideTools(); - }); - } - /** * Handles mouse events to enable shared cursor. */ diff --git a/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.spec.ts b/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.spec.ts index 0d5c0db5074..0ea08648814 100644 --- a/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.spec.ts +++ b/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.spec.ts @@ -1078,10 +1078,6 @@ describe("JointGraphWrapperService", () => { ); }); - it("getLinkIDsWithBreakpoint starts empty", () => { - expect(jointGraphWrapper.getLinkIDsWithBreakpoint()).toEqual([]); - }); - it("getElementPositionChangeEvent reports the old and new position of a moved element", () => { jointGraph.addCell(jointUIService.getJointOperatorElement(mockScanPredicate, mockPoint)); diff --git a/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts b/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts index 66ddc42cdde..cba37e986f6 100644 --- a/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts +++ b/frontend/src/app/workspace/service/workflow-graph/model/joint-graph-wrapper.ts @@ -31,8 +31,6 @@ import { dia } from "jointjs/types/joint"; import * as _ from "lodash"; import Selectors = dia.Cell.Selectors; -type linkIDType = { linkID: string }; - type JointModelEventInfo = { add: boolean; merge: boolean; @@ -152,17 +150,10 @@ export class JointGraphWrapper { // event stream of restoring zoom / offset default of the jointJS paper private restorePaperOffsetSubject: Subject = new Subject(); - // event stream of showing the breakpoint button of a link - private jointLinkBreakpointShowStream = new Subject(); - // event stream of hiding the breakpoint button of a link - private jointLinkBreakpointHideStream = new Subject(); // the currently highlighted links' ids private currentHighlightedLinks: string[] = []; - // the linkIDs of those links with a breakpoint - private currentHighlightedPorts: LogicalPort[] = []; // the IDs of ports currently being edited - private linksWithBreakpoints: string[] = []; // current zoom ratio private zoomRatio: number = JointGraphWrapper.INIT_ZOOM_VALUE; @@ -479,13 +470,6 @@ export class JointGraphWrapper { return this.jointOperatorUnhighlightStream.pipe(this.jointGraphContext.bufferWhileAsync); } - /** - * get the ids of all the links that have a breakpoint - */ - public getLinkIDsWithBreakpoint(): readonly string[] { - return this.linksWithBreakpoints; - } - /** * get the event stream of a link being highlighted. */ @@ -500,20 +484,6 @@ export class JointGraphWrapper { return this.jointLinkUnhighlightStream.pipe(this.jointGraphContext.bufferWhileAsync); } - /** - * get the event stream of showing the breakpoint button of a link - */ - public getLinkBreakpointShowStream(): Observable { - return this.jointLinkBreakpointShowStream.asObservable(); - } - - /** - * get the event stream of hiding the breakpoint button of a link - */ - public getLinkBreakpointHideStream(): Observable { - return this.jointLinkBreakpointHideStream.asObservable(); - } - /** * Gets the event stream of an operator being dragged. */ diff --git a/frontend/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts b/frontend/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts index d13e6cf10a0..9323e130a83 100644 --- a/frontend/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts +++ b/frontend/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts @@ -709,7 +709,6 @@ export class WorkflowActionService { this.getTexeraGraph().getLinkDeleteStream(), this.getTexeraGraph().getPortAddedOrDeletedStream(), this.getTexeraGraph().getOperatorPropertyChangeStream(), - this.getTexeraGraph().getBreakpointChangeStream(), this.getJointGraphWrapper().getElementPositionChangeEvent(), this.getTexeraGraph().getDisabledOperatorsChangedStream(), this.getTexeraGraph().getCommentBoxAddStream(), diff --git a/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.spec.ts b/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.spec.ts index 41942cd7a5c..0b1a8a830e5 100644 --- a/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.spec.ts +++ b/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.spec.ts @@ -789,11 +789,6 @@ describe("WorkflowGraph", () => { workflowGraph.operatorPropertyChangeSubject, { operator: mockScanPredicate }, ], - [ - workflowGraph.getBreakpointChangeStream(), - workflowGraph.breakpointChangeStream, - { oldBreakpoint: undefined, linkID: "link-1" }, - ], [ workflowGraph.getPortAddedOrDeletedStream(), workflowGraph.portAddedOrDeletedSubject, diff --git a/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.ts b/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.ts index 9c77ad41702..16366c8969c 100644 --- a/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.ts +++ b/frontend/src/app/workspace/service/workflow-graph/model/workflow-graph.ts @@ -48,14 +48,12 @@ type restrictedMethods = | "setOperatorProperty" | "addPort" | "removePort" - | "setLinkBreakpoint" | "operatorAddSubject" | "operatorDeleteSubject" | "operatorDisplayNameChangedSubject" | "linkAddSubject" | "linkDeleteSubject" | "operatorPropertyChangeSubject" - | "breakpointChangeStream" | "commentBoxAddSubject" | "commentBoxDeleteSubject" | "commentBoxAddCommentSubject" @@ -130,10 +128,6 @@ export class WorkflowGraph { public readonly operatorPropertyChangeSubject = new Subject<{ operator: OperatorPredicate; }>(); - public readonly breakpointChangeStream = new Subject<{ - oldBreakpoint: object | undefined; - linkID: string; - }>(); public readonly portAddedOrDeletedSubject = new Subject<{ newOperator: OperatorPredicate; }>(); @@ -984,16 +978,6 @@ export class WorkflowGraph { return this.operatorPropertyChangeSubject.asObservable(); } - /** - * Gets the observable event stream of a link breakpoint is changed. - */ - public getBreakpointChangeStream(): Observable<{ - oldBreakpoint: object | undefined; - linkID: string; - }> { - return this.breakpointChangeStream.asObservable(); - } - public getPortAddedOrDeletedStream(): Observable<{ newOperator: OperatorPredicate; }> {