in ui/src/app/editor/components/pipeline/pipeline.component.ts [198:257]
initAssembly() {
($('#assembly') as any).droppable({
tolerance: 'fit',
drop: (element, ui) => {
const pipelineElementId = ui.draggable.data('pe');
const pipelineElement: PipelineElementUnion =
this.findPipelineElementByElementId(pipelineElementId);
if (ui.draggable.hasClass('draggable-pipeline-element')) {
this.editorService.makePipelineAssemblyEmpty(false);
const newElementId =
pipelineElement.elementId +
':' +
this.idGeneratorService.generate(5);
const pipelineElementConfig =
this.jsplumbService.createNewPipelineElementConfig(
pipelineElement,
this.pipelineEditorService.getCoordinates(
ui,
this.currentZoomLevel,
),
false,
false,
newElementId,
);
this.rawPipelineModel.push(pipelineElementConfig);
if (pipelineElementConfig.type === 'stream') {
this.checkTopicModel(pipelineElementConfig);
} else if (pipelineElementConfig.type === 'sepa') {
setTimeout(() => {
this.jsplumbService.dataProcessorDropped(
pipelineElementConfig.payload.dom,
pipelineElementConfig.payload as DataProcessorInvocation,
true,
false,
);
}, 10);
} else if (pipelineElementConfig.type === 'action') {
setTimeout(() => {
this.jsplumbService.dataSinkDropped(
pipelineElementConfig.payload.dom,
pipelineElementConfig.payload as DataSinkInvocation,
true,
false,
);
}, 10);
}
if (this.shepherdService.isTourActive()) {
this.shepherdService.trigger(
'drop-' + pipelineElementConfig.type,
);
}
}
this.JsplumbBridge.repaintEverything();
this.validatePipeline();
this.triggerPipelineCacheUpdateEmitter.emit();
},
});
}