SequenceFlow.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = function (d, b) {
  3. extendStatics = Object.setPrototypeOf ||
  4. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  6. return extendStatics(d, b);
  7. };
  8. return function (d, b) {
  9. extendStatics(d, b);
  10. function __() { this.constructor = d; }
  11. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  12. };
  13. })();
  14. import { PolylineEdge, PolylineEdgeModel } from '@logicflow/core';
  15. import { getBpmnId } from '../getBpmnId';
  16. var SequenceFlowModel = /** @class */ (function (_super) {
  17. __extends(SequenceFlowModel, _super);
  18. function SequenceFlowModel(data, graphModel) {
  19. var _this = this;
  20. if (!data.id) {
  21. data.id = "Flow_" + getBpmnId();
  22. }
  23. _this = _super.call(this, data, graphModel) || this;
  24. return _this;
  25. }
  26. SequenceFlowModel.extendKey = 'SequenceFlowModel';
  27. return SequenceFlowModel;
  28. }(PolylineEdgeModel));
  29. var SequenceFlowView = /** @class */ (function (_super) {
  30. __extends(SequenceFlowView, _super);
  31. function SequenceFlowView() {
  32. return _super !== null && _super.apply(this, arguments) || this;
  33. }
  34. SequenceFlowView.extendKey = 'SequenceFlowEdge';
  35. return SequenceFlowView;
  36. }(PolylineEdge));
  37. var SequenceFlow = {
  38. type: 'bpmn:sequenceFlow',
  39. view: SequenceFlowView,
  40. model: SequenceFlowModel,
  41. };
  42. export { SequenceFlowView, SequenceFlowModel };
  43. export default SequenceFlow;