cnhis-design-vue 3.1.6-beta.1 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_virtual/_commonjsHelpers.mjs +5 -1
- package/es/_virtual/inherits.mjs +3 -1
- package/es/_virtual/inherits_browser.mjs +3 -1
- package/es/node_modules/diagram-js/lib/command/CommandInterceptor.mjs +139 -1
- package/es/node_modules/diagram-js/lib/draw/BaseRenderer.mjs +88 -1
- package/es/node_modules/diagram-js/lib/features/popup-menu/PopupMenu.mjs +572 -1
- package/es/node_modules/diagram-js/lib/features/rules/RuleProvider.mjs +88 -1
- package/es/node_modules/diagram-js/lib/navigation/movecanvas/MoveCanvas.mjs +120 -1
- package/es/node_modules/diagram-js/lib/navigation/movecanvas/index.mjs +8 -1
- package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomScroll.mjs +227 -1
- package/es/node_modules/diagram-js/lib/navigation/zoomscroll/ZoomUtil.mjs +24 -1
- package/es/node_modules/diagram-js/lib/util/ClickTrap.mjs +23 -1
- package/es/node_modules/diagram-js/lib/util/Cursor.mjs +20 -1
- package/es/node_modules/diagram-js/lib/util/Event.mjs +22 -1
- package/es/node_modules/diagram-js/lib/util/Math.mjs +9 -1
- package/es/node_modules/diagram-js/lib/util/Mouse.mjs +30 -1
- package/es/node_modules/diagram-js/lib/util/Platform.mjs +5 -1
- package/es/node_modules/diagram-js/lib/util/PositionUtil.mjs +8 -1
- package/es/node_modules/diagram-js/lib/util/RenderUtil.mjs +25 -1
- package/es/node_modules/diagram-js/lib/util/SvgTransformUtil.mjs +48 -1
- package/es/node_modules/ids/dist/index.esm.mjs +164 -1
- package/es/node_modules/inherits/inherits.mjs +19 -1
- package/es/node_modules/inherits/inherits_browser.mjs +38 -1
- package/es/node_modules/inherits-browser/dist/index.es.mjs +3 -1
- package/es/node_modules/min-dash/dist/index.esm.mjs +169 -1
- package/es/node_modules/min-dom/dist/index.esm.mjs +588 -1
- package/es/node_modules/tiny-svg/dist/index.esm.mjs +525 -1
- package/es/packages/big-table/index.d.ts +3 -0
- package/es/packages/big-table/index.mjs +1 -1
- package/es/packages/big-table/index2.mjs +15 -1
- package/es/packages/big-table/src/BigTable.mjs +2 -1
- package/es/packages/big-table/src/BigTable.vue.d.ts +3 -0
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.mjs +2341 -1
- package/es/packages/big-table/src/BigTable2.mjs +4 -1
- package/es/packages/big-table/src/bigTableEmits.mjs +1 -1
- package/es/packages/big-table/src/bigTableEmits2.mjs +49 -1
- package/es/packages/big-table/src/bigTableProps.mjs +1 -1
- package/es/packages/big-table/src/bigTableProps2.mjs +116 -1
- package/es/packages/big-table/src/bigTableState.mjs +1 -1
- package/es/packages/big-table/src/bigTableState2.mjs +52 -1
- package/es/packages/big-table/src/components/NoData.mjs +2 -1
- package/es/packages/big-table/src/components/NoData.vue_vue_type_script_setup_true_lang.mjs +72 -1
- package/es/packages/big-table/src/components/NoData2.mjs +4 -1
- package/es/packages/big-table/src/components/edit-form/edit-date.mjs +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-date2.mjs +114 -1
- package/es/packages/big-table/src/components/edit-form/edit-input.mjs +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-input2.mjs +54 -1
- package/es/packages/big-table/src/components/edit-form/edit-select-table.mjs +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-select-table2.mjs +148 -1
- package/es/packages/big-table/src/components/edit-form/edit-select.mjs +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-select2.mjs +89 -1
- package/es/packages/big-table/src/hooks/useBatchEditing.mjs +1 -1
- package/es/packages/big-table/src/hooks/useBatchEditing2.mjs +289 -1
- package/es/packages/big-table/src/hooks/useEdit.mjs +1 -1
- package/es/packages/big-table/src/hooks/useEdit2.mjs +115 -1
- package/es/packages/big-table/src/hooks/useEvent.mjs +1 -1
- package/es/packages/big-table/src/hooks/useEvent2.mjs +70 -1
- package/es/packages/big-table/src/hooks/useFormat.mjs +1 -1
- package/es/packages/big-table/src/hooks/useFormat2.mjs +484 -1
- package/es/packages/big-table/src/hooks/useNestTable.mjs +1 -1
- package/es/packages/big-table/src/hooks/useNestTable2.mjs +85 -1
- package/es/packages/big-table/src/hooks/useTableParse.mjs +1 -1
- package/es/packages/big-table/src/hooks/useTableParse2.mjs +135 -1
- package/es/packages/big-table/src/utils.mjs +1 -1
- package/es/packages/big-table/src/utils2.mjs +607 -1
- package/es/packages/bpmn-workflow/index.mjs +1 -1
- package/es/packages/bpmn-workflow/index2.mjs +11 -1
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.mjs +2 -1
- package/es/packages/bpmn-workflow/src/BpmnWorkflow.vue_vue_type_script_setup_true_lang.mjs +252 -1
- package/es/packages/bpmn-workflow/src/BpmnWorkflow2.mjs +4 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer2.mjs +1427 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomContextPadProvider2.mjs +373 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPalette2.mjs +141 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap2.mjs +99 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer2.mjs +119 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules2.mjs +40 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/index.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/customBpmn/index2.mjs +25 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/index.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customModeler/index2.mjs +12 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/CustomPopupMenu2.mjs +47 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer2.mjs +14 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/zoomScroll.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customOtherModule/zoomScroll2.mjs +10 -1
- package/es/packages/bpmn-workflow/src/custom/customRules/no-task.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customRules/no-task2.mjs +16 -1
- package/es/packages/bpmn-workflow/src/custom/customTranslate/customTranslate.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customTranslate/customTranslate2.mjs +15 -1
- package/es/packages/bpmn-workflow/src/custom/customTranslate/zh.mjs +1 -1
- package/es/packages/bpmn-workflow/src/custom/customTranslate/zh2.mjs +227 -1
- package/es/packages/button-print/index.d.ts +7 -2
- package/es/packages/button-print/index.mjs +1 -1
- package/es/packages/button-print/index2.mjs +11 -1
- package/es/packages/button-print/src/ButtonPrint.mjs +2 -1
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +7 -2
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.mjs +453 -1
- package/es/packages/button-print/src/ButtonPrint2.mjs +4 -1
- package/es/packages/button-print/src/components/IdentityVerification.mjs +2 -1
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +4 -2
- package/es/packages/button-print/src/components/IdentityVerification.vue_vue_type_script_setup_true_lang.mjs +128 -1
- package/es/packages/button-print/src/components/IdentityVerification2.mjs +4 -1
- package/es/packages/button-print/src/utils/print.es.min.mjs +1 -1
- package/es/packages/button-print/src/utils/print.es.min2.mjs +2080 -1
- package/es/packages/chunk-upload/index.mjs +1 -1
- package/es/packages/chunk-upload/index2.mjs +14 -1
- package/es/packages/chunk-upload/src/chunk-upload-new.mjs +2 -1
- package/es/packages/chunk-upload/src/chunk-upload-new.vue_vue_type_script_setup_true_lang.mjs +466 -1
- package/es/packages/chunk-upload/src/chunk-upload-new2.mjs +4 -1
- package/es/packages/chunk-upload/src/hooks/upload-computed.mjs +1 -1
- package/es/packages/chunk-upload/src/hooks/upload-computed2.mjs +68 -1
- package/es/packages/chunk-upload/src/hooks/upload-data.mjs +1 -1
- package/es/packages/chunk-upload/src/hooks/upload-data2.mjs +93 -1
- package/es/packages/chunk-upload/src/hooks/vod-computed.mjs +1 -1
- package/es/packages/chunk-upload/src/hooks/vod-computed2.mjs +79 -1
- package/es/packages/chunk-upload/src/hooks/vod-data.mjs +1 -1
- package/es/packages/chunk-upload/src/hooks/vod-data2.mjs +33 -1
- package/es/packages/chunk-upload/src/vod-chunk-upload/index.mjs +2 -1
- package/es/packages/chunk-upload/src/vod-chunk-upload/index2.mjs +3 -1
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.mjs +2 -1
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue_vue_type_script_setup_true_lang.mjs +326 -1
- package/es/packages/chunk-upload/src/vod-chunk-upload/vod-chunk-upload2.mjs +4 -1
- package/es/packages/chunk-upload/src/vod-upload-modal.mjs +1 -1
- package/es/packages/chunk-upload/src/vod-upload-modal2.mjs +95 -1
- package/es/packages/drag-layout/index.d.ts +18 -8
- package/es/packages/drag-layout/index.mjs +1 -1
- package/es/packages/drag-layout/index2.mjs +11 -1
- package/es/packages/drag-layout/src/DragFormLeftItem.mjs +2 -1
- package/es/packages/drag-layout/src/DragFormLeftItem.vue.d.ts +7 -4
- package/es/packages/drag-layout/src/DragFormLeftItem.vue_vue_type_script_setup_true_lang.mjs +122 -1
- package/es/packages/drag-layout/src/DragFormLeftItem2.mjs +4 -1
- package/es/packages/drag-layout/src/DragFormRightItem.mjs +2 -1
- package/es/packages/drag-layout/src/DragFormRightItem.vue.d.ts +4 -1
- package/es/packages/drag-layout/src/DragFormRightItem.vue_vue_type_script_setup_true_lang.mjs +267 -1
- package/es/packages/drag-layout/src/DragFormRightItem2.mjs +4 -1
- package/es/packages/drag-layout/src/DragLayout.mjs +2 -1
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +18 -11
- package/es/packages/drag-layout/src/DragLayout.vue_vue_type_script_setup_true_lang.mjs +659 -1
- package/es/packages/drag-layout/src/DragLayout2.mjs +4 -1
- package/es/packages/editor/index.mjs +1 -1
- package/es/packages/editor/index2.mjs +10 -1
- package/es/packages/editor/src/Editor.mjs +1 -1
- package/es/packages/editor/src/Editor2.mjs +77 -1
- package/es/packages/field-set/index.d.ts +5150 -2513
- package/es/packages/field-set/index.mjs +1 -1
- package/es/packages/field-set/index2.mjs +11 -1
- package/es/packages/field-set/src/FieldSet.mjs +2 -1
- package/es/packages/field-set/src/FieldSet.vue.d.ts +3 -0
- package/es/packages/field-set/src/FieldSet.vue_vue_type_script_setup_true_lang.mjs +330 -1
- package/es/packages/field-set/src/FieldSet2.mjs +4 -1
- package/es/packages/field-set/src/Index.mjs +2 -0
- package/es/packages/field-set/src/Index.vue_vue_type_script_setup_true_lang.mjs +25 -0
- package/es/packages/field-set/src/Index2.mjs +4 -0
- package/es/packages/field-set/src/NewFieldSet.mjs +2 -0
- package/es/packages/field-set/src/NewFieldSet.vue.d.ts +2599 -0
- package/es/packages/field-set/src/NewFieldSet.vue_vue_type_script_setup_true_lang.mjs +301 -0
- package/es/packages/field-set/src/NewFieldSet2.mjs +4 -0
- package/es/packages/field-set/src/index.vue_vue_type_script_setup_true_lang2.mjs +25 -0
- package/es/packages/field-set/src/index3.mjs +4 -0
- package/es/packages/form-table/index.d.ts +41 -16
- package/es/packages/form-table/index.mjs +1 -1
- package/es/packages/form-table/index2.mjs +11 -1
- package/es/packages/form-table/src/FormTable.mjs +2 -1
- package/es/packages/form-table/src/FormTable.vue.d.ts +44 -28
- package/es/packages/form-table/src/FormTable.vue_vue_type_script_setup_true_lang.mjs +474 -1
- package/es/packages/form-table/src/FormTable2.mjs +4 -1
- package/es/packages/form-table/src/components/index.d.ts +41 -16
- package/es/packages/form-table/src/components/index.mjs +1 -1
- package/es/packages/form-table/src/components/index2.mjs +54 -1
- package/es/packages/form-table/src/components/table-age.mjs +2 -1
- package/es/packages/form-table/src/components/table-age.vue.d.ts +4 -1
- package/es/packages/form-table/src/components/table-age.vue_vue_type_script_setup_true_lang.mjs +232 -1
- package/es/packages/form-table/src/components/table-age2.mjs +4 -1
- package/es/packages/form-table/src/components/table-date-picker.mjs +2 -1
- package/es/packages/form-table/src/components/table-date-picker.vue.d.ts +2 -1
- package/es/packages/form-table/src/components/table-date-picker.vue_vue_type_script_setup_true_lang.mjs +178 -1
- package/es/packages/form-table/src/components/table-date-picker2.mjs +4 -1
- package/es/packages/form-table/src/components/table-digital.mjs +2 -1
- package/es/packages/form-table/src/components/table-digital.vue.d.ts +3 -0
- package/es/packages/form-table/src/components/table-digital.vue_vue_type_script_setup_true_lang.mjs +138 -1
- package/es/packages/form-table/src/components/table-digital2.mjs +4 -1
- package/es/packages/form-table/src/components/table-input-password.mjs +2 -1
- package/es/packages/form-table/src/components/table-input-password.vue.d.ts +7 -2
- package/es/packages/form-table/src/components/table-input-password.vue_vue_type_script_setup_true_lang.mjs +138 -1
- package/es/packages/form-table/src/components/table-input-password2.mjs +4 -1
- package/es/packages/form-table/src/components/table-input.mjs +2 -1
- package/es/packages/form-table/src/components/table-input.vue.d.ts +7 -2
- package/es/packages/form-table/src/components/table-input.vue_vue_type_script_setup_true_lang.mjs +124 -1
- package/es/packages/form-table/src/components/table-input2.mjs +4 -1
- package/es/packages/form-table/src/components/table-month-picker.mjs +2 -1
- package/es/packages/form-table/src/components/table-month-picker.vue.d.ts +2 -1
- package/es/packages/form-table/src/components/table-month-picker.vue_vue_type_script_setup_true_lang.mjs +99 -1
- package/es/packages/form-table/src/components/table-month-picker2.mjs +4 -1
- package/es/packages/form-table/src/components/table-search-more.mjs +2 -1
- package/es/packages/form-table/src/components/table-search-more.vue_vue_type_script_setup_true_lang.mjs +276 -1
- package/es/packages/form-table/src/components/table-search-more2.mjs +4 -1
- package/es/packages/form-table/src/components/table-search.mjs +2 -1
- package/es/packages/form-table/src/components/table-search.vue.d.ts +1 -1
- package/es/packages/form-table/src/components/table-search.vue_vue_type_script_setup_true_lang.mjs +276 -1
- package/es/packages/form-table/src/components/table-search2.mjs +4 -1
- package/es/packages/form-table/src/components/table-select-multiple.mjs +2 -1
- package/es/packages/form-table/src/components/table-select-multiple.vue.d.ts +1 -1
- package/es/packages/form-table/src/components/table-select-multiple.vue_vue_type_script_setup_true_lang.mjs +160 -1
- package/es/packages/form-table/src/components/table-select-multiple2.mjs +4 -1
- package/es/packages/form-table/src/components/table-select.mjs +2 -1
- package/es/packages/form-table/src/components/table-select.vue.d.ts +1 -1
- package/es/packages/form-table/src/components/table-select.vue_vue_type_script_setup_true_lang.mjs +155 -1
- package/es/packages/form-table/src/components/table-select2.mjs +4 -1
- package/es/packages/form-table/src/components/table-textarea.mjs +2 -1
- package/es/packages/form-table/src/components/table-textarea.vue.d.ts +7 -2
- package/es/packages/form-table/src/components/table-textarea.vue_vue_type_script_setup_true_lang.mjs +153 -1
- package/es/packages/form-table/src/components/table-textarea2.mjs +4 -1
- package/es/packages/form-table/src/components/table-time-picker.mjs +2 -1
- package/es/packages/form-table/src/components/table-time-picker.vue.d.ts +2 -1
- package/es/packages/form-table/src/components/table-time-picker.vue_vue_type_script_setup_true_lang.mjs +145 -1
- package/es/packages/form-table/src/components/table-time-picker2.mjs +4 -1
- package/es/packages/form-table/src/components/table-tree-select.mjs +2 -1
- package/es/packages/form-table/src/components/table-tree-select.vue.d.ts +1 -3
- package/es/packages/form-table/src/components/table-tree-select.vue_vue_type_script_setup_true_lang.mjs +279 -1
- package/es/packages/form-table/src/components/table-tree-select2.mjs +4 -1
- package/es/packages/form-table/src/components/text-over-tooltip.mjs +2 -1
- package/es/packages/form-table/src/components/text-over-tooltip.vue.d.ts +3 -0
- package/es/packages/form-table/src/components/text-over-tooltip.vue_vue_type_script_setup_true_lang.mjs +62 -1
- package/es/packages/form-table/src/components/text-over-tooltip2.mjs +4 -1
- package/es/packages/form-table/src/configs/index.mjs +1 -1
- package/es/packages/form-table/src/configs/index2.mjs +74 -1
- package/es/packages/form-table/src/hooks/index.mjs +5 -1
- package/es/packages/form-table/src/hooks/useBoundDate.mjs +1 -1
- package/es/packages/form-table/src/hooks/useBoundDate2.mjs +411 -1
- package/es/packages/form-table/src/hooks/useDateType.mjs +1 -1
- package/es/packages/form-table/src/hooks/useDateType2.mjs +160 -1
- package/es/packages/form-table/src/hooks/useFormCommon.mjs +1 -1
- package/es/packages/form-table/src/hooks/useFormCommon2.mjs +95 -1
- package/es/packages/form-table/src/hooks/useFormEvent.mjs +1 -1
- package/es/packages/form-table/src/hooks/useFormEvent2.mjs +71 -1
- package/es/packages/form-table/src/hooks/useItemDefault.mjs +1 -1
- package/es/packages/form-table/src/hooks/useItemDefault2.mjs +218 -1
- package/es/packages/form-table/src/hooks/useSearch.mjs +1 -1
- package/es/packages/form-table/src/hooks/useSearch2.mjs +1216 -1
- package/es/packages/form-table/src/hooks/useValidate.mjs +1 -1
- package/es/packages/form-table/src/hooks/useValidate2.mjs +480 -1
- package/es/packages/grid/index.mjs +1 -1
- package/es/packages/grid/index2.mjs +12 -1
- package/es/packages/grid/src/Grid.mjs +1 -1
- package/es/packages/grid/src/Grid2.mjs +28 -1
- package/es/packages/grid/src/hooks.mjs +1 -1
- package/es/packages/grid/src/hooks2.mjs +165 -1
- package/es/packages/index.css +121 -0
- package/es/packages/index.less +154 -0
- package/es/packages/index.mjs +16 -1
- package/es/packages/index2.mjs +64 -1
- package/es/packages/info-header/index.d.ts +2 -2
- package/es/packages/info-header/index.mjs +1 -1
- package/es/packages/info-header/index2.mjs +11 -1
- package/es/packages/info-header/src/HiddenContent.mjs +2 -0
- package/es/packages/info-header/src/{hidden-content.vue.d.ts → HiddenContent.vue.d.ts} +0 -0
- package/es/packages/info-header/src/HiddenContent.vue_vue_type_script_setup_true_lang.mjs +61 -0
- package/es/packages/info-header/src/HiddenContent2.mjs +4 -0
- package/es/packages/info-header/src/InfoHeader.mjs +2 -0
- package/es/packages/info-header/src/{info-header.vue.d.ts → InfoHeader.vue.d.ts} +2 -2
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.mjs +218 -0
- package/es/packages/info-header/src/InfoHeader2.mjs +4 -0
- package/es/packages/info-header/src/{slot-render.d.ts → SlotRender.d.ts} +0 -0
- package/es/packages/info-header/src/SlotRender.mjs +1 -0
- package/es/packages/info-header/src/SlotRender2.mjs +35 -0
- package/es/packages/info-header/style/index.css +3 -0
- package/es/packages/info-header/style/index.less +5 -1
- package/es/packages/map/index.d.ts +4 -2
- package/es/packages/map/index.mjs +1 -1
- package/es/packages/map/index2.mjs +11 -1
- package/es/packages/map/src/Map.mjs +2 -1
- package/es/packages/map/src/Map.vue.d.ts +4 -2
- package/es/packages/map/src/Map.vue_vue_type_script_setup_true_lang.mjs +336 -1
- package/es/packages/map/src/Map2.mjs +4 -1
- package/es/packages/scale-view/index.mjs +1 -1
- package/es/packages/scale-view/index2.mjs +35 -1
- package/es/packages/scale-view/src/ScaleView.mjs +2 -1
- package/es/packages/scale-view/src/ScaleView.vue_vue_type_script_setup_true_lang.mjs +370 -1
- package/es/packages/scale-view/src/ScaleView2.mjs +4 -1
- package/es/packages/scale-view/src/components/AnswerParse.mjs +2 -1
- package/es/packages/scale-view/src/components/AnswerParse.vue_vue_type_script_setup_true_lang.mjs +78 -1
- package/es/packages/scale-view/src/components/AnswerParse2.mjs +4 -1
- package/es/packages/scale-view/src/components/EvaluateCountdown.mjs +2 -1
- package/es/packages/scale-view/src/components/EvaluateCountdown.vue_vue_type_script_setup_true_lang.mjs +109 -1
- package/es/packages/scale-view/src/components/EvaluateCountdown2.mjs +4 -1
- package/es/packages/scale-view/src/components/EvaluatePage.mjs +2 -1
- package/es/packages/scale-view/src/components/EvaluatePage.vue_vue_type_script_setup_true_lang.mjs +139 -1
- package/es/packages/scale-view/src/components/EvaluatePage2.mjs +4 -1
- package/es/packages/scale-view/src/components/NoData.mjs +2 -1
- package/es/packages/scale-view/src/components/NoData.vue_vue_type_script_setup_true_lang.mjs +72 -1
- package/es/packages/scale-view/src/components/NoData2.mjs +4 -1
- package/es/packages/scale-view/src/components/ScaleScore.mjs +1 -1
- package/es/packages/scale-view/src/components/ScaleScore2.mjs +63 -1
- package/es/packages/scale-view/src/components/composables/choose-common.mjs +1 -1
- package/es/packages/scale-view/src/components/composables/choose-common2.mjs +78 -1
- package/es/packages/scale-view/src/components/formitem/address.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/address2.mjs +3993 -1
- package/es/packages/scale-view/src/components/formitem/r-address.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-address2.mjs +225 -1
- package/es/packages/scale-view/src/components/formitem/r-cascader.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-cascader2.mjs +121 -1
- package/es/packages/scale-view/src/components/formitem/r-checkbox.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-checkbox2.mjs +228 -1
- package/es/packages/scale-view/src/components/formitem/r-collection.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-collection2.mjs +111 -1
- package/es/packages/scale-view/src/components/formitem/r-datetime.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-datetime2.mjs +198 -1
- package/es/packages/scale-view/src/components/formitem/r-input.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-input2.mjs +88 -1
- package/es/packages/scale-view/src/components/formitem/r-map.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-map2.mjs +104 -1
- package/es/packages/scale-view/src/components/formitem/r-radio.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-radio2.mjs +220 -1
- package/es/packages/scale-view/src/components/formitem/r-select.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-select2.mjs +134 -1
- package/es/packages/scale-view/src/components/formitem/r-upload.mjs +1 -1
- package/es/packages/scale-view/src/components/formitem/r-upload2.mjs +210 -1
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.mjs +2 -1
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +3 -0
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.mjs +77 -1
- package/es/packages/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip2.mjs +4 -1
- package/es/packages/scale-view/src/hooks/scaleview-computed.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-computed2.mjs +300 -1
- package/es/packages/scale-view/src/hooks/scaleview-init.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-init2.mjs +441 -1
- package/es/packages/scale-view/src/hooks/scaleview-props.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-props2.mjs +56 -1
- package/es/packages/scale-view/src/hooks/scaleview-state.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-state2.mjs +42 -1
- package/es/packages/scale-view/src/hooks/scaleview-submit.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-submit2.mjs +162 -1
- package/es/packages/scale-view/src/hooks/scaleview-validate.mjs +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-validate2.mjs +164 -1
- package/es/packages/scale-view/src/hooks/use-component.mjs +1 -1
- package/es/packages/scale-view/src/hooks/use-component2.mjs +80 -1
- package/es/packages/scale-view/src/hooks/use-evaluate.mjs +1 -1
- package/es/packages/scale-view/src/hooks/use-evaluate2.mjs +150 -1
- package/es/packages/scale-view/src/hooks/use-event.mjs +1 -1
- package/es/packages/scale-view/src/hooks/use-event2.mjs +128 -1
- package/es/packages/scale-view/src/hooks/use-noData.mjs +1 -1
- package/es/packages/scale-view/src/hooks/use-noData2.mjs +41 -1
- package/es/packages/scale-view/src/utils/judge-types.mjs +1 -1
- package/es/packages/scale-view/src/utils/judge-types2.mjs +40 -1
- package/es/packages/select-label/index.d.ts +33 -4
- package/es/packages/select-label/index.mjs +1 -1
- package/es/packages/select-label/index2.mjs +17 -1
- package/es/packages/select-label/src/LabelFormContent.mjs +2 -1
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +7 -2
- package/es/packages/select-label/src/LabelFormContent.vue_vue_type_script_setup_true_lang.mjs +442 -1
- package/es/packages/select-label/src/LabelFormContent2.mjs +4 -1
- package/es/packages/select-label/src/SelectLabel.mjs +2 -1
- package/es/packages/select-label/src/SelectLabel.vue.d.ts +31 -11
- package/es/packages/select-label/src/SelectLabel.vue_vue_type_script_setup_true_lang.mjs +431 -1
- package/es/packages/select-label/src/SelectLabel2.mjs +4 -1
- package/es/packages/select-label/src/components/label-classify.mjs +2 -1
- package/es/packages/select-label/src/components/label-classify.vue.d.ts +7 -2
- package/es/packages/select-label/src/components/label-classify.vue_vue_type_script_setup_true_lang.mjs +124 -1
- package/es/packages/select-label/src/components/label-classify2.mjs +4 -1
- package/es/packages/select-person/index.d.ts +5 -3
- package/es/packages/select-person/index.mjs +1 -1
- package/es/packages/select-person/index2.mjs +11 -1
- package/es/packages/select-person/src/SearchTree.mjs +2 -1
- package/es/packages/select-person/src/SearchTree.vue.d.ts +1 -1
- package/es/packages/select-person/src/SearchTree.vue_vue_type_script_setup_true_lang.mjs +233 -1
- package/es/packages/select-person/src/SearchTree2.mjs +4 -1
- package/es/packages/select-person/src/SelectPerson.mjs +2 -1
- package/es/packages/select-person/src/SelectPerson.vue.d.ts +10 -6
- package/es/packages/select-person/src/SelectPerson.vue_vue_type_script_setup_true_lang.mjs +895 -1
- package/es/packages/select-person/src/SelectPerson2.mjs +4 -1
- package/es/packages/select-person/src/utils/index.d.ts +8 -8
- package/es/packages/select-person/src/utils/index.mjs +1 -1
- package/es/packages/select-person/src/utils/index2.mjs +57 -1
- package/es/packages/time-line/index.d.ts +19 -0
- package/es/packages/time-line/index.mjs +1 -1
- package/es/packages/time-line/index2.mjs +11 -1
- package/es/packages/time-line/src/TimeLine.mjs +2 -1
- package/es/packages/time-line/src/TimeLine.vue.d.ts +19 -0
- package/es/packages/time-line/src/TimeLine.vue_vue_type_script_setup_true_lang.mjs +63 -1
- package/es/packages/time-line/src/TimeLine2.mjs +4 -1
- package/es/src/components/SelectPage/SelectPage.mjs +2 -1
- package/es/src/components/SelectPage/SelectPage.vue_vue_type_script_setup_true_lang.mjs +61 -1
- package/es/src/components/SelectPage/SelectPage2.mjs +4 -1
- package/es/src/components/SelectPage/index.mjs +2 -1
- package/es/src/components/SelectPage/index2.mjs +3 -1
- package/es/src/components/SvgIcon/SvgIcon.mjs +2 -1
- package/es/src/components/SvgIcon/SvgIcon.vue_vue_type_script_setup_true_lang.mjs +34 -1
- package/es/src/components/SvgIcon/SvgIcon2.mjs +4 -1
- package/es/src/components/SvgIcon/index.mjs +2 -1
- package/es/src/components/SvgIcon/index2.mjs +3 -1
- package/es/src/components/TextOverTooltip/TextOverTooltip.mjs +2 -1
- package/es/src/components/TextOverTooltip/TextOverTooltip.vue.d.ts +3 -0
- package/es/src/components/TextOverTooltip/TextOverTooltip.vue_vue_type_script_setup_true_lang.mjs +74 -1
- package/es/src/components/TextOverTooltip/TextOverTooltip2.mjs +4 -1
- package/es/src/components/TextOverTooltip/index.mjs +2 -1
- package/es/src/components/TextOverTooltip/index2.mjs +3 -1
- package/es/src/components/player-vod/index.mjs +2 -1
- package/es/src/components/player-vod/index.vue_vue_type_script_setup_true_lang.mjs +12 -1
- package/es/src/components/player-vod/index2.mjs +4 -1
- package/es/src/components/player-vod/player.mjs +1 -1
- package/es/src/components/player-vod/player2.mjs +121 -1
- package/es/src/components/player-vod/video-list.mjs +1 -1
- package/es/src/components/player-vod/video-list2.mjs +125 -1
- package/es/src/components/player-vod/video-modal.mjs +1 -1
- package/es/src/components/player-vod/video-modal2.mjs +91 -1
- package/es/src/core/create.mjs +1 -1
- package/es/src/core/create2.mjs +8 -1
- package/es/src/global/variable.mjs +1 -1
- package/es/src/global/variable2.mjs +4 -1
- package/es/src/utils/clickoutside.mjs +1 -1
- package/es/src/utils/clickoutside2.mjs +48 -1
- package/es/src/utils/crypto.mjs +1 -1
- package/es/src/utils/crypto2.mjs +25 -1
- package/es/src/utils/index.d.ts +0 -2
- package/es/src/utils/index.mjs +1 -1
- package/es/src/utils/index2.mjs +19 -1
- package/es/src/utils/loadViewer.d.ts +2 -0
- package/es/src/utils/loadViewer.mjs +1 -0
- package/es/src/utils/loadViewer2.mjs +11 -0
- package/es/src/utils/loadVxe.d.ts +2 -0
- package/es/src/utils/loadVxe.mjs +1 -0
- package/es/src/utils/loadVxe2.mjs +12 -0
- package/es/src/utils/vexutils.mjs +3 -1
- package/es/src/utils/vexutils2.mjs +786 -1
- package/package.json +8 -11
- package/es/packages/info-header/src/hidden-content.mjs +0 -1
- package/es/packages/info-header/src/hidden-content.vue_vue_type_script_setup_true_lang.mjs +0 -1
- package/es/packages/info-header/src/hidden-content2.mjs +0 -1
- package/es/packages/info-header/src/info-header.mjs +0 -1
- package/es/packages/info-header/src/info-header.vue_vue_type_script_setup_true_lang.mjs +0 -1
- package/es/packages/info-header/src/info-header2.mjs +0 -1
- package/es/packages/info-header/src/slot-render.mjs +0 -1
- package/es/packages/info-header/src/slot-render2.mjs +0 -1
- package/es/packages/popper/index.d.ts +0 -0
- package/es/packages/popper/index.mjs +0 -1
- package/es/packages/popper/src/components/popover.mjs +0 -1
- package/es/packages/popper/src/components/popover.vue.d.ts +0 -33
- package/es/packages/popper/src/components/popover.vue_vue_type_script_setup_true_lang.mjs +0 -1
- package/es/packages/popper/src/components/popover2.mjs +0 -1
- package/es/packages/popper/src/hooks/useAutoHidden.d.ts +0 -8
- package/es/packages/popper/src/hooks/useAutoHidden.mjs +0 -1
- package/es/packages/popper/src/hooks/useAutoHidden2.mjs +0 -1
- package/es/packages/popper/src/types/index.d.ts +0 -1
- package/es/packages/popper/src/types/index.mjs +0 -1
|
@@ -1 +1,1427 @@
|
|
|
1
|
-
import t from"../../../../../../node_modules/inherits/inherits.mjs";import{assign as e,forEach as i,isObject as n}from"../../../../../../node_modules/min-dash/dist/index.esm.mjs";import r from"../../../../../../node_modules/diagram-js/lib/draw/BaseRenderer.mjs";import{isExpanded as a,isEventSubProcess as o}from"bpmn-js/lib/util/DiUtil";import{getLabel as l}from"bpmn-js/lib/features/label-editing/LabelUtil";import{is as c}from"bpmn-js/lib/util/ModelUtil";import{createLine as s}from"../../../../../../node_modules/diagram-js/lib/util/RenderUtil.mjs";import{getCirclePath as h,getRoundRectPath as d,getDiamondPath as m,getRectPath as f,getFillColor as p,getStrokeColor as u,getSemantic as k,getLabelColor as g,getDi as b,isCollection as y,isThrowEvent as S,isTypedEvent as E}from"bpmn-js/lib/draw/BpmnRenderUtil";import{query as v}from"../../../../../../node_modules/min-dom/dist/index.esm.mjs";import{attr as x,create as w,append as W,classes as A}from"../../../../../../node_modules/tiny-svg/dist/index.esm.mjs";import{rotate as T,transform as P,translate as D}from"../../../../../../node_modules/diagram-js/lib/util/SvgTransformUtil.mjs";import L from"../../../../../../node_modules/ids/dist/index.esm.mjs";var _=new L;function F(t,c,h,d,m,f,L){r.call(this,c,L);var F=t&&t.defaultFillColor,M=t&&t.defaultStrokeColor,R=t&&t.defaultLabelColor,O=_.next(),N={},H=h.computeStyle;function C(t,i){var n=e({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},i.attrs),r=i.ref||{x:0,y:0},a=i.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=w("marker");x(i.element,n),W(o,i.element),x(o,{id:t,viewBox:"0 0 20 20",refX:r.x,refY:r.y,markerWidth:20*a,markerHeight:20*a,orient:"auto"});var l=v("defs",m._svg);l||(l=w("defs"),W(m._svg,l)),W(l,o),N[t]=o}function I(t){return t.replace(/[^0-9a-zA-z]+/g,"_")}function j(t,e,i){var n=t+"-"+I(e)+"-"+I(i)+"-"+O;return N[n]||function(t,e,i,n){if("sequenceflow-end"===e){var r=w("path");x(r,{d:"M 1 5 L 11 10 L 1 15 Z"}),C(t,{element:r,ref:{x:11,y:10},scale:.5,attrs:{fill:n,stroke:n}})}if("messageflow-start"===e){var a=w("circle");x(a,{cx:6,cy:6,r:3.5}),C(t,{element:a,attrs:{fill:i,stroke:n},ref:{x:6,y:6}})}if("messageflow-end"===e){var o=w("path");x(o,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),C(t,{element:o,attrs:{fill:i,stroke:n,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===e){var l=w("path");x(l,{d:"M 11 5 L 1 10 L 11 15"}),C(t,{element:l,attrs:{fill:"none",stroke:n,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===e){var c=w("path");x(c,{d:"M 1 5 L 11 10 L 1 15"}),C(t,{element:c,attrs:{fill:"none",stroke:n,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===e){var s=w("path");x(s,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),C(t,{element:s,attrs:{fill:i,stroke:n},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===e){var h=w("path");x(h,{d:"M 6 4 L 10 16"}),C(t,{element:h,attrs:{stroke:n},ref:{x:0,y:10},scale:.5})}}(n,t,e,i),"url(#"+n+")"}function G(t,e,i,r,a){n(r)&&(a=r,r=0),r=r||0,"none"===(a=H(a,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete a.fillOpacity;var o=e/2,l=i/2,c=w("circle");return x(c,{cx:o,cy:l,r:Math.round((e+i)/4-r)}),x(c,a),W(t,c),c}function B(t,e,i,r,a,o){n(a)&&(o=a,a=0),a=a||0,o=H(o,{stroke:"black",strokeWidth:2,fill:"white"});var l=w("rect");return x(l,{x:a,y:a,width:e-2*a,height:i-2*a,rx:r,ry:r}),x(l,o),W(t,l),l}function U(t,e,i){i=H(i,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"});var n=s(e,i);return W(t,n),n}function K(t,e,i){i=H(i,["no-fill"],{strokeWidth:2,stroke:"black"});var n=w("path");return x(n,{d:e}),x(n,i),W(t,n),n}function V(t,i,n,r){return K(i,n,e({"data-marker":t},r))}function q(t){return function(e,i){return Q[t](e,i)}}function Y(t){return Q[t]}function $(t,e){var i=k(t),n=S(i);return i.eventDefinitions&&i.eventDefinitions.length>1?i.parallelMultiple?Y("bpmn:ParallelMultipleEventDefinition")(e,t,n):Y("bpmn:MultipleEventDefinition")(e,t,n):E(i,"bpmn:MessageEventDefinition")?Y("bpmn:MessageEventDefinition")(e,t,n):E(i,"bpmn:TimerEventDefinition")?Y("bpmn:TimerEventDefinition")(e,t,n):E(i,"bpmn:ConditionalEventDefinition")?Y("bpmn:ConditionalEventDefinition")(e,t):E(i,"bpmn:SignalEventDefinition")?Y("bpmn:SignalEventDefinition")(e,t,n):E(i,"bpmn:EscalationEventDefinition")?Y("bpmn:EscalationEventDefinition")(e,t,n):E(i,"bpmn:LinkEventDefinition")?Y("bpmn:LinkEventDefinition")(e,t,n):E(i,"bpmn:ErrorEventDefinition")?Y("bpmn:ErrorEventDefinition")(e,t,n):E(i,"bpmn:CancelEventDefinition")?Y("bpmn:CancelEventDefinition")(e,t,n):E(i,"bpmn:CompensateEventDefinition")?Y("bpmn:CompensateEventDefinition")(e,t,n):E(i,"bpmn:TerminateEventDefinition")?Y("bpmn:TerminateEventDefinition")(e,t,n):null}function z(t,i,n){n=e({size:{width:100}},n);var r=f.createText(i||"",n);return A(r).add("djs-label"),W(t,r),r}function X(t,e,i){return z(t,k(e).name,{box:e,align:i,padding:5,style:{fill:g(e,R,M)}})}function J(t,e,i){var n=z(t,e,{box:{height:30,width:i.height},align:"center-middle",style:{fill:g(i,R,M)}}),r=-1*i.height;P(n,0,-r,270)}function Z(t){for(var e=t.waypoints,i="m "+e[0].x+","+e[0].y,n=1;n<e.length;n++)i+="L"+e[n].x+","+e[n].y+" ";return i}var Q=this.handlers={"bpmn:Event":function(t,e,i){return"fillOpacity"in i||(i.fillOpacity=.95),G(t,e.width,e.height,i)},"bpmn:StartEvent":function(t,e){var i={fill:p(e,F),stroke:u(e,M)};k(e).isInterrupting||(i={strokeDasharray:"6",strokeLinecap:"round",fill:p(e,F),stroke:u(e,M)});var n=Y("bpmn:Event")(t,e,i);return $(e,t),n},"bpmn:MessageEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:e.width,containerHeight:e.height,position:{mx:.235,my:.315}}),{strokeWidth:1,fill:i?u(e,M):p(e,F),stroke:i?p(e,F):u(e,M)})},"bpmn:TimerEventDefinition":function(t,e){var i=G(t,e.width,e.height,.2*e.height,{strokeWidth:2,fill:p(e,F),stroke:u(e,M)});K(t,d.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.5}}),{strokeWidth:2,strokeLinecap:"square",stroke:u(e,M)});for(var n=0;n<12;n++){var r=d.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.5}}),a=e.width/2;K(t,r,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*n+","+e.height/2+","+a+")",stroke:u(e,M)})}return i},"bpmn:EscalationEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:ConditionalEventDefinition":function(t,e){return K(t,d.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.222}}),{strokeWidth:1,stroke:u(e,M)})},"bpmn:LinkEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.57,my:.263}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:ErrorEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:e.width,containerHeight:e.height,position:{mx:.2,my:.722}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:CancelEventDefinition":function(t,e,i){var n=K(t,d.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.638,my:-.055}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)});return T(n,45),n},"bpmn:CompensateEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.22,my:.5}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:SignalEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:e.width,containerHeight:e.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:i?u(e,M):"none",stroke:u(e,M)})},"bpmn:MultipleEventDefinition":function(t,e,i){return K(t,d.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:e.width,containerHeight:e.height,position:{mx:.222,my:.36}}),{strokeWidth:1,fill:i?u(e,M):"none"})},"bpmn:ParallelMultipleEventDefinition":function(t,e){return K(t,d.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:e.width,containerHeight:e.height,position:{mx:.458,my:.194}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)})},"bpmn:EndEvent":function(t,e){var i=Y("bpmn:Event")(t,e,{strokeWidth:4,fill:p(e,F),stroke:u(e,M)});return $(e,t),i},"bpmn:TerminateEventDefinition":function(t,e){return G(t,e.width,e.height,8,{strokeWidth:4,fill:u(e,M),stroke:u(e,M)})},"bpmn:IntermediateEvent":function(t,e){var i=Y("bpmn:Event")(t,e,{strokeWidth:1,fill:p(e,F),stroke:u(e,M)});return G(t,e.width,e.height,3,{strokeWidth:1,fill:p(e,"none"),stroke:u(e,M)}),$(e,t),i},"bpmn:IntermediateCatchEvent":q("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":q("bpmn:IntermediateEvent"),"bpmn:Activity":function(t,e,i){return"fillOpacity"in(i=i||{})||(i.fillOpacity=.95),B(t,e.width,e.height,10,i)},"bpmn:Task":function(t,e){var i={fill:p(e,F),stroke:u(e,M)},n=Y("bpmn:Activity")(t,e,i);return X(t,e,"center-middle"),tt(t,e),n},"bpmn:ServiceTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:UserTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:ManualTask":function(t,e){var i=Y("bpmn:Task")(t,e);return K(t,d.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{strokeWidth:.5,fill:p(e,F),stroke:u(e,M)}),i},"bpmn:SendTask":function(t,e){var i=Y("bpmn:Task")(t,e);return K(t,d.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{strokeWidth:1,fill:u(e,M),stroke:p(e,F)}),i},"bpmn:ReceiveTask":function(t,e){var i,n=k(e),r=Y("bpmn:Task")(t,e);return n.instantiate?(G(t,28,28,4.4,{strokeWidth:1}),i=d.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=d.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),K(t,i,{strokeWidth:1,fill:p(e,F),stroke:u(e,M)}),r},"bpmn:ScriptTask":function(t,e){return Y("bpmn:Task")(t,e)},"bpmn:BusinessRuleTask":function(t,e){var i=Y("bpmn:Task")(t,e),n=K(t,d.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}));x(n,{strokeWidth:1,fill:p(e,"#aaaaaa"),stroke:u(e,M)});var r=K(t,d.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}));return x(r,{strokeWidth:1,stroke:u(e,M)}),i},"bpmn:SubProcess":function(t,i,n){n=e({fill:p(i,F),stroke:u(i,M)},n);var r=Y("bpmn:Activity")(t,i,n),l=a(i);return o(i)&&x(r,{strokeDasharray:"1,2"}),X(t,i,l?"center-top":"center-middle"),l?tt(t,i):tt(t,i,["SubProcessMarker"]),r},"bpmn:AdHocSubProcess":function(t,e){return Y("bpmn:SubProcess")(t,e)},"bpmn:Transaction":function(t,e){var i=Y("bpmn:SubProcess")(t,e),n=h.style(["no-fill","no-events"],{stroke:u(e,M)});return B(t,e.width,e.height,8,3,n),i},"bpmn:CallActivity":function(t,e){return Y("bpmn:SubProcess")(t,e,{strokeWidth:5})},"bpmn:Participant":function(t,e){var i={fillOpacity:.95,fill:p(e,F),stroke:u(e,M)},n=Y("bpmn:Lane")(t,e,i);a(e)?(U(t,[{x:30,y:0},{x:30,y:e.height}],{stroke:u(e,M)}),J(t,k(e).name,e)):z(t,k(e).name,{box:e,align:"center-middle",style:{fill:g(e,R,M)}});return!!k(e).participantMultiplicity&&Y("ParticipantMultiplicityMarker")(t,e),n},"bpmn:Lane":function(t,i,n){var r=B(t,i.width,i.height,0,e({fill:p(i,F),fillOpacity:.35,stroke:u(i,M)},n)),a=k(i);"bpmn:Lane"===a.$type&&J(t,a.name,i);return r},"bpmn:InclusiveGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return G(t,e.width,e.height,.24*e.height,{strokeWidth:2.5,fill:p(e,F),stroke:u(e,M)}),i},"bpmn:ExclusiveGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e),n=d.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:e.width,containerHeight:e.height,position:{mx:.32,my:.3}});return b(e).isMarkerVisible&&K(t,n,{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:ComplexGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return K(t,d.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:e.width,containerHeight:e.height,position:{mx:.46,my:.26}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:ParallelGateway":function(t,e){var i=Y("bpmn:Gateway")(t,e);return K(t,d.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:e.width,containerHeight:e.height,position:{mx:.46,my:.2}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)}),i},"bpmn:EventBasedGateway":function(t,e){var i=k(e),n=Y("bpmn:Gateway")(t,e);G(t,e.width,e.height,.2*e.height,{strokeWidth:1,fill:"none",stroke:u(e,M)});var r,a,o=i.eventGatewayType,l=!!i.instantiate;if("Parallel"===o){var c=d.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:e.width,containerHeight:e.height,position:{mx:.474,my:.296}}),s=K(t,c);x(s,{strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!l){var h=G(t,e.width,e.height,.26*e.height);x(h,{strokeWidth:1,fill:"none",stroke:u(e,M)})}r=d.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:e.width,containerHeight:e.height,position:{mx:.36,my:.44}}),a={strokeWidth:2,fill:p(e,"none"),stroke:u(e,M)},K(t,r,a)}return n},"bpmn:Gateway":function(t,e){var i={fill:p(e,F),fillOpacity:.95,stroke:u(e,M)};return function(t,e,i,n){var r=e/2,a=i/2,o=[{x:r,y:0},{x:e,y:a},{x:r,y:i},{x:0,y:a}].map((function(t){return t.x+","+t.y})).join(" ");n=H(n,{stroke:"black",strokeWidth:2,fill:"white"});var l=w("polygon");return x(l,{points:o}),x(l,n),W(t,l),l}(t,e.width,e.height,i)},"bpmn:SequenceFlow":function(t,e){var i,n=Z(e),r=p(e,F),a=u(e,M),o=K(t,n,{strokeLinejoin:"round",markerEnd:j("sequenceflow-end",r,a),stroke:u(e,M)}),l=k(e);return e.source&&(i=e.source.businessObject,l.conditionExpression&&i.$instanceOf("bpmn:Activity")&&x(o,{markerStart:j("conditional-flow-marker",r,a)}),i.default&&(i.$instanceOf("bpmn:Gateway")||i.$instanceOf("bpmn:Activity"))&&i.default===l&&x(o,{markerStart:j("conditional-default-flow-marker",r,a)})),o},"bpmn:Association":function(t,i,n){var r=k(i),a=p(i,F),o=u(i,M);return n=e({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:u(i,M)},n||{}),"One"!==r.associationDirection&&"Both"!==r.associationDirection||(n.markerEnd=j("association-end",a,o)),"Both"===r.associationDirection&&(n.markerStart=j("association-start",a,o)),U(t,i.waypoints,n)},"bpmn:DataInputAssociation":function(t,e){var i=p(e,F),n=u(e,M);return Y("bpmn:Association")(t,e,{markerEnd:j("association-end",i,n)})},"bpmn:DataOutputAssociation":function(t,e){var i=p(e,F),n=u(e,M);return Y("bpmn:Association")(t,e,{markerEnd:j("association-end",i,n)})},"bpmn:MessageFlow":function(t,e){var i=k(e),n=b(e),r=p(e,F),a=u(e,M),o=K(t,Z(e),{markerEnd:j("messageflow-end",r,a),markerStart:j("messageflow-start",r,a),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:u(e,M)});if(i.messageRef){var l=o.getPointAtLength(o.getTotalLength()/2),c=d.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:l.x,y:l.y}}),s={strokeWidth:1};"initiating"===n.messageVisibleKind?(s.fill="white",s.stroke="black"):(s.fill="#888",s.stroke="white");var h=K(t,c,s),m=z(t,i.messageRef.name,{align:"center-top",fitBox:!0,style:{fill:u(e,R,M)}}),f=h.getBBox(),g=m.getBBox(),y=l.x-g.width/2,S=l.y+f.height/2+10;P(m,y,S,0)}return o},"bpmn:DataObject":function(t,e){var i=K(t,d.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.474,my:.296}}),{fill:p(e,F),fillOpacity:.95,stroke:u(e,M)}),n=k(e);return y(n)&&function(t,e){var i=(e.height-18)/e.height,n=d.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:.33,my:i}});K(t,n,{strokeWidth:2})}(t,e),i},"bpmn:DataObjectReference":q("bpmn:DataObject"),"bpmn:DataInput":function(t,e){var i=d.getRawPath("DATA_ARROW"),n=Y("bpmn:DataObject")(t,e);return K(t,i,{strokeWidth:1}),n},"bpmn:DataOutput":function(t,e){var i=d.getRawPath("DATA_ARROW"),n=Y("bpmn:DataObject")(t,e);return K(t,i,{strokeWidth:1,fill:"black"}),n},"bpmn:DataStoreReference":function(t,e){return K(t,d.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:0,my:.133}}),{strokeWidth:2,fill:p(e,F),fillOpacity:.95,stroke:u(e,M)})},"bpmn:BoundaryEvent":function(t,i){var n=k(i).cancelActivity,r={strokeWidth:1,fill:p(i,F),stroke:u(i,M)};n||(r.strokeDasharray="6",r.strokeLinecap="round");var a=e({},r,{fillOpacity:1}),o=e({},r,{fill:"none"}),l=Y("bpmn:Event")(t,i,a);return G(t,i.width,i.height,3,o),$(i,t),l},"bpmn:Group":function(t,e){return B(t,e.width,e.height,10,{stroke:u(e,M),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(t,i){return function(t,i){var n={width:90,height:30,x:i.width/2+i.x,y:i.height/2+i.y};return z(t,l(i),{box:n,fitBox:!0,style:e({},f.getExternalStyle(),{fill:g(i,R,M)})})}(t,i)},"bpmn:TextAnnotation":function(t,e){var i=B(t,e.width,e.height,0,0,{fill:"none",stroke:"none"});return K(t,d.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:0,my:0}}),{stroke:u(e,M)}),z(t,k(e).text||"",{box:e,align:"left-top",padding:5,style:{fill:g(e,R,M)}}),i},ParticipantMultiplicityMarker:function(t,e){V("participant-multiplicity",t,d.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:e.width/2/e.width,my:(e.height-15)/e.height}}),{strokeWidth:2,fill:p(e,F),stroke:u(e,M)})},SubProcessMarker:function(t,e){var i=B(t,14,14,0,{strokeWidth:1,fill:p(e,F),stroke:u(e,M)});D(i,e.width/2-7.5,e.height-20),V("sub-process",t,d.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2-7.5)/e.width,my:(e.height-20)/e.height}}),{fill:p(e,F),stroke:u(e,M)})},ParallelMarker:function(t,e,i){V("parallel",t,d.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.parallel)/e.width,my:(e.height-20)/e.height}}),{fill:p(e,F),stroke:u(e,M)})},SequentialMarker:function(t,e,i){V("sequential",t,d.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.seq)/e.width,my:(e.height-19)/e.height}}),{fill:p(e,F),stroke:u(e,M)})},CompensationMarker:function(t,e,i){V("compensation",t,d.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.compensation)/e.width,my:(e.height-13)/e.height}}),{strokeWidth:1,fill:p(e,F),stroke:u(e,M)})},LoopMarker:function(t,e,i){V("loop",t,d.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.loop)/e.width,my:(e.height-7)/e.height}}),{strokeWidth:1,fill:p(e,F),stroke:u(e,M),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(t,e,i){V("adhoc",t,d.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:e.width,containerHeight:e.height,position:{mx:(e.width/2+i.adhoc)/e.width,my:(e.height-15)/e.height}}),{strokeWidth:1,fill:u(e,M),stroke:u(e,M)})}};function tt(t,e,n){var r,a=k(e),o=n&&-1!==n.indexOf("SubProcessMarker");r=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},i(n,(function(i){Y(i)(t,e,r)})),a.isForCompensation&&Y("CompensationMarker")(t,e,r),"bpmn:AdHocSubProcess"===a.$type&&Y("AdhocMarker")(t,e,r);var l=a.loopCharacteristics,c=l&&l.isSequential;l&&(void 0===c&&Y("LoopMarker")(t,e,r),!1===c&&Y("ParallelMarker")(t,e,r),!0===c&&Y("SequentialMarker")(t,e,r))}this._drawPath=K}t(F,r),F.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],F.prototype.canRender=function(t){return c(t,"bpmn:BaseElement")},F.prototype.drawShape=function(t,e){var i=e.type;return(0,this.handlers[i])(t,e)},F.prototype.drawConnection=function(t,e){var i=e.type;return(0,this.handlers[i])(t,e)},F.prototype.getShapePath=function(t){return c(t,"bpmn:Event")?h(t):c(t,"bpmn:Activity")?d(t,10):c(t,"bpmn:Gateway")?m(t):f(t)};export{F as default};
|
|
1
|
+
import inherits from '../../../../../../node_modules/inherits/inherits.mjs';
|
|
2
|
+
import { assign, forEach, isObject } from '../../../../../../node_modules/min-dash/dist/index.esm.mjs';
|
|
3
|
+
import BaseRenderer from '../../../../../../node_modules/diagram-js/lib/draw/BaseRenderer.mjs';
|
|
4
|
+
import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil';
|
|
5
|
+
import { getLabel } from 'bpmn-js/lib/features/label-editing/LabelUtil';
|
|
6
|
+
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
|
7
|
+
import { createLine } from '../../../../../../node_modules/diagram-js/lib/util/RenderUtil.mjs';
|
|
8
|
+
import { getCirclePath, getRoundRectPath, getDiamondPath, getRectPath, getFillColor, getStrokeColor, getSemantic, getLabelColor, getDi, isCollection, isThrowEvent, isTypedEvent } from 'bpmn-js/lib/draw/BpmnRenderUtil';
|
|
9
|
+
import { query } from '../../../../../../node_modules/min-dom/dist/index.esm.mjs';
|
|
10
|
+
import { attr, create, append, classes } from '../../../../../../node_modules/tiny-svg/dist/index.esm.mjs';
|
|
11
|
+
import { rotate, transform, translate } from '../../../../../../node_modules/diagram-js/lib/util/SvgTransformUtil.mjs';
|
|
12
|
+
import Ids from '../../../../../../node_modules/ids/dist/index.esm.mjs';
|
|
13
|
+
|
|
14
|
+
var RENDERER_IDS = new Ids();
|
|
15
|
+
var TASK_BORDER_RADIUS = 10;
|
|
16
|
+
var INNER_OUTER_DIST = 3;
|
|
17
|
+
var DEFAULT_FILL_OPACITY = 0.95, HIGH_FILL_OPACITY = 0.35;
|
|
18
|
+
var ELEMENT_LABEL_DISTANCE = 10;
|
|
19
|
+
function BpmnRenderer(config, eventBus, styles, pathMap, canvas, textRenderer, priority) {
|
|
20
|
+
BaseRenderer.call(this, eventBus, priority);
|
|
21
|
+
var defaultFillColor = config && config.defaultFillColor, defaultStrokeColor = config && config.defaultStrokeColor, defaultLabelColor = config && config.defaultLabelColor;
|
|
22
|
+
var rendererId = RENDERER_IDS.next();
|
|
23
|
+
var markers = {};
|
|
24
|
+
var computeStyle = styles.computeStyle;
|
|
25
|
+
function addMarker(id, options) {
|
|
26
|
+
var attrs = assign({
|
|
27
|
+
fill: "black",
|
|
28
|
+
strokeWidth: 1,
|
|
29
|
+
strokeLinecap: "round",
|
|
30
|
+
strokeDasharray: "none"
|
|
31
|
+
}, options.attrs);
|
|
32
|
+
var ref = options.ref || { x: 0, y: 0 };
|
|
33
|
+
var scale = options.scale || 1;
|
|
34
|
+
if (attrs.strokeDasharray === "none") {
|
|
35
|
+
attrs.strokeDasharray = [1e4, 1];
|
|
36
|
+
}
|
|
37
|
+
var marker2 = create("marker");
|
|
38
|
+
attr(options.element, attrs);
|
|
39
|
+
append(marker2, options.element);
|
|
40
|
+
attr(marker2, {
|
|
41
|
+
id,
|
|
42
|
+
viewBox: "0 0 20 20",
|
|
43
|
+
refX: ref.x,
|
|
44
|
+
refY: ref.y,
|
|
45
|
+
markerWidth: 20 * scale,
|
|
46
|
+
markerHeight: 20 * scale,
|
|
47
|
+
orient: "auto"
|
|
48
|
+
});
|
|
49
|
+
var defs = query("defs", canvas._svg);
|
|
50
|
+
if (!defs) {
|
|
51
|
+
defs = create("defs");
|
|
52
|
+
append(canvas._svg, defs);
|
|
53
|
+
}
|
|
54
|
+
append(defs, marker2);
|
|
55
|
+
markers[id] = marker2;
|
|
56
|
+
}
|
|
57
|
+
function colorEscape(str) {
|
|
58
|
+
return str.replace(/[^0-9a-zA-z]+/g, "_");
|
|
59
|
+
}
|
|
60
|
+
function marker(type, fill, stroke) {
|
|
61
|
+
var id = type + "-" + colorEscape(fill) + "-" + colorEscape(stroke) + "-" + rendererId;
|
|
62
|
+
if (!markers[id]) {
|
|
63
|
+
createMarker(id, type, fill, stroke);
|
|
64
|
+
}
|
|
65
|
+
return "url(#" + id + ")";
|
|
66
|
+
}
|
|
67
|
+
function createMarker(id, type, fill, stroke) {
|
|
68
|
+
if (type === "sequenceflow-end") {
|
|
69
|
+
var sequenceflowEnd = create("path");
|
|
70
|
+
attr(sequenceflowEnd, { d: "M 1 5 L 11 10 L 1 15 Z" });
|
|
71
|
+
addMarker(id, {
|
|
72
|
+
element: sequenceflowEnd,
|
|
73
|
+
ref: { x: 11, y: 10 },
|
|
74
|
+
scale: 0.5,
|
|
75
|
+
attrs: {
|
|
76
|
+
fill: stroke,
|
|
77
|
+
stroke
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (type === "messageflow-start") {
|
|
82
|
+
var messageflowStart = create("circle");
|
|
83
|
+
attr(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
|
|
84
|
+
addMarker(id, {
|
|
85
|
+
element: messageflowStart,
|
|
86
|
+
attrs: {
|
|
87
|
+
fill,
|
|
88
|
+
stroke
|
|
89
|
+
},
|
|
90
|
+
ref: { x: 6, y: 6 }
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (type === "messageflow-end") {
|
|
94
|
+
var messageflowEnd = create("path");
|
|
95
|
+
attr(messageflowEnd, { d: "m 1 5 l 0 -3 l 7 3 l -7 3 z" });
|
|
96
|
+
addMarker(id, {
|
|
97
|
+
element: messageflowEnd,
|
|
98
|
+
attrs: {
|
|
99
|
+
fill,
|
|
100
|
+
stroke,
|
|
101
|
+
strokeLinecap: "butt"
|
|
102
|
+
},
|
|
103
|
+
ref: { x: 8.5, y: 5 }
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (type === "association-start") {
|
|
107
|
+
var associationStart = create("path");
|
|
108
|
+
attr(associationStart, { d: "M 11 5 L 1 10 L 11 15" });
|
|
109
|
+
addMarker(id, {
|
|
110
|
+
element: associationStart,
|
|
111
|
+
attrs: {
|
|
112
|
+
fill: "none",
|
|
113
|
+
stroke,
|
|
114
|
+
strokeWidth: 1.5
|
|
115
|
+
},
|
|
116
|
+
ref: { x: 1, y: 10 },
|
|
117
|
+
scale: 0.5
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (type === "association-end") {
|
|
121
|
+
var associationEnd = create("path");
|
|
122
|
+
attr(associationEnd, { d: "M 1 5 L 11 10 L 1 15" });
|
|
123
|
+
addMarker(id, {
|
|
124
|
+
element: associationEnd,
|
|
125
|
+
attrs: {
|
|
126
|
+
fill: "none",
|
|
127
|
+
stroke,
|
|
128
|
+
strokeWidth: 1.5
|
|
129
|
+
},
|
|
130
|
+
ref: { x: 12, y: 10 },
|
|
131
|
+
scale: 0.5
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
if (type === "conditional-flow-marker") {
|
|
135
|
+
var conditionalflowMarker = create("path");
|
|
136
|
+
attr(conditionalflowMarker, { d: "M 0 10 L 8 6 L 16 10 L 8 14 Z" });
|
|
137
|
+
addMarker(id, {
|
|
138
|
+
element: conditionalflowMarker,
|
|
139
|
+
attrs: {
|
|
140
|
+
fill,
|
|
141
|
+
stroke
|
|
142
|
+
},
|
|
143
|
+
ref: { x: -1, y: 10 },
|
|
144
|
+
scale: 0.5
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if (type === "conditional-default-flow-marker") {
|
|
148
|
+
var conditionaldefaultflowMarker = create("path");
|
|
149
|
+
attr(conditionaldefaultflowMarker, { d: "M 6 4 L 10 16" });
|
|
150
|
+
addMarker(id, {
|
|
151
|
+
element: conditionaldefaultflowMarker,
|
|
152
|
+
attrs: {
|
|
153
|
+
stroke
|
|
154
|
+
},
|
|
155
|
+
ref: { x: 0, y: 10 },
|
|
156
|
+
scale: 0.5
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function drawCircle(parentGfx, width, height, offset, attrs) {
|
|
161
|
+
if (isObject(offset)) {
|
|
162
|
+
attrs = offset;
|
|
163
|
+
offset = 0;
|
|
164
|
+
}
|
|
165
|
+
offset = offset || 0;
|
|
166
|
+
attrs = computeStyle(attrs, {
|
|
167
|
+
stroke: "black",
|
|
168
|
+
strokeWidth: 2,
|
|
169
|
+
fill: "white"
|
|
170
|
+
});
|
|
171
|
+
if (attrs.fill === "none") {
|
|
172
|
+
delete attrs.fillOpacity;
|
|
173
|
+
}
|
|
174
|
+
var cx = width / 2, cy = height / 2;
|
|
175
|
+
var circle = create("circle");
|
|
176
|
+
attr(circle, {
|
|
177
|
+
cx,
|
|
178
|
+
cy,
|
|
179
|
+
r: Math.round((width + height) / 4 - offset)
|
|
180
|
+
});
|
|
181
|
+
attr(circle, attrs);
|
|
182
|
+
append(parentGfx, circle);
|
|
183
|
+
return circle;
|
|
184
|
+
}
|
|
185
|
+
function drawRect(parentGfx, width, height, r, offset, attrs) {
|
|
186
|
+
if (isObject(offset)) {
|
|
187
|
+
attrs = offset;
|
|
188
|
+
offset = 0;
|
|
189
|
+
}
|
|
190
|
+
offset = offset || 0;
|
|
191
|
+
attrs = computeStyle(attrs, {
|
|
192
|
+
stroke: "black",
|
|
193
|
+
strokeWidth: 2,
|
|
194
|
+
fill: "white"
|
|
195
|
+
});
|
|
196
|
+
var rect = create("rect");
|
|
197
|
+
attr(rect, {
|
|
198
|
+
x: offset,
|
|
199
|
+
y: offset,
|
|
200
|
+
width: width - offset * 2,
|
|
201
|
+
height: height - offset * 2,
|
|
202
|
+
rx: r,
|
|
203
|
+
ry: r
|
|
204
|
+
});
|
|
205
|
+
attr(rect, attrs);
|
|
206
|
+
append(parentGfx, rect);
|
|
207
|
+
return rect;
|
|
208
|
+
}
|
|
209
|
+
function drawDiamond(parentGfx, width, height, attrs) {
|
|
210
|
+
var x_2 = width / 2;
|
|
211
|
+
var y_2 = height / 2;
|
|
212
|
+
var points = [
|
|
213
|
+
{ x: x_2, y: 0 },
|
|
214
|
+
{ x: width, y: y_2 },
|
|
215
|
+
{ x: x_2, y: height },
|
|
216
|
+
{ x: 0, y: y_2 }
|
|
217
|
+
];
|
|
218
|
+
var pointsString = points.map(function(point) {
|
|
219
|
+
return point.x + "," + point.y;
|
|
220
|
+
}).join(" ");
|
|
221
|
+
attrs = computeStyle(attrs, {
|
|
222
|
+
stroke: "black",
|
|
223
|
+
strokeWidth: 2,
|
|
224
|
+
fill: "white"
|
|
225
|
+
});
|
|
226
|
+
var polygon = create("polygon");
|
|
227
|
+
attr(polygon, {
|
|
228
|
+
points: pointsString
|
|
229
|
+
});
|
|
230
|
+
attr(polygon, attrs);
|
|
231
|
+
append(parentGfx, polygon);
|
|
232
|
+
return polygon;
|
|
233
|
+
}
|
|
234
|
+
function drawLine(parentGfx, waypoints, attrs) {
|
|
235
|
+
attrs = computeStyle(attrs, ["no-fill"], {
|
|
236
|
+
stroke: "black",
|
|
237
|
+
strokeWidth: 2,
|
|
238
|
+
fill: "none"
|
|
239
|
+
});
|
|
240
|
+
var line = createLine(waypoints, attrs);
|
|
241
|
+
append(parentGfx, line);
|
|
242
|
+
return line;
|
|
243
|
+
}
|
|
244
|
+
function drawPath(parentGfx, d, attrs) {
|
|
245
|
+
attrs = computeStyle(attrs, ["no-fill"], {
|
|
246
|
+
strokeWidth: 2,
|
|
247
|
+
stroke: "black"
|
|
248
|
+
});
|
|
249
|
+
var path = create("path");
|
|
250
|
+
attr(path, { d });
|
|
251
|
+
attr(path, attrs);
|
|
252
|
+
append(parentGfx, path);
|
|
253
|
+
return path;
|
|
254
|
+
}
|
|
255
|
+
function drawMarker(type, parentGfx, path, attrs) {
|
|
256
|
+
return drawPath(parentGfx, path, assign({ "data-marker": type }, attrs));
|
|
257
|
+
}
|
|
258
|
+
function as(type) {
|
|
259
|
+
return function(parentGfx, element) {
|
|
260
|
+
return handlers[type](parentGfx, element);
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function renderer(type) {
|
|
264
|
+
return handlers[type];
|
|
265
|
+
}
|
|
266
|
+
function renderEventContent(element, parentGfx) {
|
|
267
|
+
var event = getSemantic(element);
|
|
268
|
+
var isThrowing = isThrowEvent(event);
|
|
269
|
+
if (event.eventDefinitions && event.eventDefinitions.length > 1) {
|
|
270
|
+
if (event.parallelMultiple) {
|
|
271
|
+
return renderer("bpmn:ParallelMultipleEventDefinition")(parentGfx, element, isThrowing);
|
|
272
|
+
} else {
|
|
273
|
+
return renderer("bpmn:MultipleEventDefinition")(parentGfx, element, isThrowing);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
if (isTypedEvent(event, "bpmn:MessageEventDefinition")) {
|
|
277
|
+
return renderer("bpmn:MessageEventDefinition")(parentGfx, element, isThrowing);
|
|
278
|
+
}
|
|
279
|
+
if (isTypedEvent(event, "bpmn:TimerEventDefinition")) {
|
|
280
|
+
return renderer("bpmn:TimerEventDefinition")(parentGfx, element, isThrowing);
|
|
281
|
+
}
|
|
282
|
+
if (isTypedEvent(event, "bpmn:ConditionalEventDefinition")) {
|
|
283
|
+
return renderer("bpmn:ConditionalEventDefinition")(parentGfx, element);
|
|
284
|
+
}
|
|
285
|
+
if (isTypedEvent(event, "bpmn:SignalEventDefinition")) {
|
|
286
|
+
return renderer("bpmn:SignalEventDefinition")(parentGfx, element, isThrowing);
|
|
287
|
+
}
|
|
288
|
+
if (isTypedEvent(event, "bpmn:EscalationEventDefinition")) {
|
|
289
|
+
return renderer("bpmn:EscalationEventDefinition")(parentGfx, element, isThrowing);
|
|
290
|
+
}
|
|
291
|
+
if (isTypedEvent(event, "bpmn:LinkEventDefinition")) {
|
|
292
|
+
return renderer("bpmn:LinkEventDefinition")(parentGfx, element, isThrowing);
|
|
293
|
+
}
|
|
294
|
+
if (isTypedEvent(event, "bpmn:ErrorEventDefinition")) {
|
|
295
|
+
return renderer("bpmn:ErrorEventDefinition")(parentGfx, element, isThrowing);
|
|
296
|
+
}
|
|
297
|
+
if (isTypedEvent(event, "bpmn:CancelEventDefinition")) {
|
|
298
|
+
return renderer("bpmn:CancelEventDefinition")(parentGfx, element, isThrowing);
|
|
299
|
+
}
|
|
300
|
+
if (isTypedEvent(event, "bpmn:CompensateEventDefinition")) {
|
|
301
|
+
return renderer("bpmn:CompensateEventDefinition")(parentGfx, element, isThrowing);
|
|
302
|
+
}
|
|
303
|
+
if (isTypedEvent(event, "bpmn:TerminateEventDefinition")) {
|
|
304
|
+
return renderer("bpmn:TerminateEventDefinition")(parentGfx, element, isThrowing);
|
|
305
|
+
}
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
function renderLabel(parentGfx, label, options) {
|
|
309
|
+
options = assign({
|
|
310
|
+
size: {
|
|
311
|
+
width: 100
|
|
312
|
+
}
|
|
313
|
+
}, options);
|
|
314
|
+
var text = textRenderer.createText(label || "", options);
|
|
315
|
+
classes(text).add("djs-label");
|
|
316
|
+
append(parentGfx, text);
|
|
317
|
+
return text;
|
|
318
|
+
}
|
|
319
|
+
function renderEmbeddedLabel(parentGfx, element, align) {
|
|
320
|
+
var semantic = getSemantic(element);
|
|
321
|
+
return renderLabel(parentGfx, semantic.name, {
|
|
322
|
+
box: element,
|
|
323
|
+
align,
|
|
324
|
+
padding: 5,
|
|
325
|
+
style: {
|
|
326
|
+
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function renderExternalLabel(parentGfx, element) {
|
|
331
|
+
var box = {
|
|
332
|
+
width: 90,
|
|
333
|
+
height: 30,
|
|
334
|
+
x: element.width / 2 + element.x,
|
|
335
|
+
y: element.height / 2 + element.y
|
|
336
|
+
};
|
|
337
|
+
return renderLabel(parentGfx, getLabel(element), {
|
|
338
|
+
box,
|
|
339
|
+
fitBox: true,
|
|
340
|
+
style: assign({}, textRenderer.getExternalStyle(), {
|
|
341
|
+
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
342
|
+
})
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function renderLaneLabel(parentGfx, text, element) {
|
|
346
|
+
var textBox = renderLabel(parentGfx, text, {
|
|
347
|
+
box: {
|
|
348
|
+
height: 30,
|
|
349
|
+
width: element.height
|
|
350
|
+
},
|
|
351
|
+
align: "center-middle",
|
|
352
|
+
style: {
|
|
353
|
+
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
var top = -1 * element.height;
|
|
357
|
+
transform(textBox, 0, -top, 270);
|
|
358
|
+
}
|
|
359
|
+
function createPathFromConnection(connection) {
|
|
360
|
+
var waypoints = connection.waypoints;
|
|
361
|
+
var pathData = "m " + waypoints[0].x + "," + waypoints[0].y;
|
|
362
|
+
for (var i = 1; i < waypoints.length; i++) {
|
|
363
|
+
pathData += "L" + waypoints[i].x + "," + waypoints[i].y + " ";
|
|
364
|
+
}
|
|
365
|
+
return pathData;
|
|
366
|
+
}
|
|
367
|
+
var handlers = this.handlers = {
|
|
368
|
+
"bpmn:Event": function(parentGfx, element, attrs) {
|
|
369
|
+
if (!("fillOpacity" in attrs)) {
|
|
370
|
+
attrs.fillOpacity = DEFAULT_FILL_OPACITY;
|
|
371
|
+
}
|
|
372
|
+
return drawCircle(parentGfx, element.width, element.height, attrs);
|
|
373
|
+
},
|
|
374
|
+
"bpmn:StartEvent": function(parentGfx, element) {
|
|
375
|
+
var attrs = {
|
|
376
|
+
fill: getFillColor(element, defaultFillColor),
|
|
377
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
378
|
+
};
|
|
379
|
+
var semantic = getSemantic(element);
|
|
380
|
+
if (!semantic.isInterrupting) {
|
|
381
|
+
attrs = {
|
|
382
|
+
strokeDasharray: "6",
|
|
383
|
+
strokeLinecap: "round",
|
|
384
|
+
fill: getFillColor(element, defaultFillColor),
|
|
385
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
var circle = renderer("bpmn:Event")(parentGfx, element, attrs);
|
|
389
|
+
renderEventContent(element, parentGfx);
|
|
390
|
+
return circle;
|
|
391
|
+
},
|
|
392
|
+
"bpmn:MessageEventDefinition": function(parentGfx, element, isThrowing) {
|
|
393
|
+
var pathData = pathMap.getScaledPath("EVENT_MESSAGE", {
|
|
394
|
+
xScaleFactor: 0.9,
|
|
395
|
+
yScaleFactor: 0.9,
|
|
396
|
+
containerWidth: element.width,
|
|
397
|
+
containerHeight: element.height,
|
|
398
|
+
position: {
|
|
399
|
+
mx: 0.235,
|
|
400
|
+
my: 0.315
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
var fill = isThrowing ? getStrokeColor(element, defaultStrokeColor) : getFillColor(element, defaultFillColor);
|
|
404
|
+
var stroke = isThrowing ? getFillColor(element, defaultFillColor) : getStrokeColor(element, defaultStrokeColor);
|
|
405
|
+
var messagePath = drawPath(parentGfx, pathData, {
|
|
406
|
+
strokeWidth: 1,
|
|
407
|
+
fill,
|
|
408
|
+
stroke
|
|
409
|
+
});
|
|
410
|
+
return messagePath;
|
|
411
|
+
},
|
|
412
|
+
"bpmn:TimerEventDefinition": function(parentGfx, element) {
|
|
413
|
+
var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, {
|
|
414
|
+
strokeWidth: 2,
|
|
415
|
+
fill: getFillColor(element, defaultFillColor),
|
|
416
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
417
|
+
});
|
|
418
|
+
var pathData = pathMap.getScaledPath("EVENT_TIMER_WH", {
|
|
419
|
+
xScaleFactor: 0.75,
|
|
420
|
+
yScaleFactor: 0.75,
|
|
421
|
+
containerWidth: element.width,
|
|
422
|
+
containerHeight: element.height,
|
|
423
|
+
position: {
|
|
424
|
+
mx: 0.5,
|
|
425
|
+
my: 0.5
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
drawPath(parentGfx, pathData, {
|
|
429
|
+
strokeWidth: 2,
|
|
430
|
+
strokeLinecap: "square",
|
|
431
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
432
|
+
});
|
|
433
|
+
for (var i = 0; i < 12; i++) {
|
|
434
|
+
var linePathData = pathMap.getScaledPath("EVENT_TIMER_LINE", {
|
|
435
|
+
xScaleFactor: 0.75,
|
|
436
|
+
yScaleFactor: 0.75,
|
|
437
|
+
containerWidth: element.width,
|
|
438
|
+
containerHeight: element.height,
|
|
439
|
+
position: {
|
|
440
|
+
mx: 0.5,
|
|
441
|
+
my: 0.5
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
var width = element.width / 2;
|
|
445
|
+
var height = element.height / 2;
|
|
446
|
+
drawPath(parentGfx, linePathData, {
|
|
447
|
+
strokeWidth: 1,
|
|
448
|
+
strokeLinecap: "square",
|
|
449
|
+
transform: "rotate(" + i * 30 + "," + height + "," + width + ")",
|
|
450
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
return circle;
|
|
454
|
+
},
|
|
455
|
+
"bpmn:EscalationEventDefinition": function(parentGfx, event, isThrowing) {
|
|
456
|
+
var pathData = pathMap.getScaledPath("EVENT_ESCALATION", {
|
|
457
|
+
xScaleFactor: 1,
|
|
458
|
+
yScaleFactor: 1,
|
|
459
|
+
containerWidth: event.width,
|
|
460
|
+
containerHeight: event.height,
|
|
461
|
+
position: {
|
|
462
|
+
mx: 0.5,
|
|
463
|
+
my: 0.2
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
467
|
+
return drawPath(parentGfx, pathData, {
|
|
468
|
+
strokeWidth: 1,
|
|
469
|
+
fill,
|
|
470
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
471
|
+
});
|
|
472
|
+
},
|
|
473
|
+
"bpmn:ConditionalEventDefinition": function(parentGfx, event) {
|
|
474
|
+
var pathData = pathMap.getScaledPath("EVENT_CONDITIONAL", {
|
|
475
|
+
xScaleFactor: 1,
|
|
476
|
+
yScaleFactor: 1,
|
|
477
|
+
containerWidth: event.width,
|
|
478
|
+
containerHeight: event.height,
|
|
479
|
+
position: {
|
|
480
|
+
mx: 0.5,
|
|
481
|
+
my: 0.222
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
return drawPath(parentGfx, pathData, {
|
|
485
|
+
strokeWidth: 1,
|
|
486
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
487
|
+
});
|
|
488
|
+
},
|
|
489
|
+
"bpmn:LinkEventDefinition": function(parentGfx, event, isThrowing) {
|
|
490
|
+
var pathData = pathMap.getScaledPath("EVENT_LINK", {
|
|
491
|
+
xScaleFactor: 1,
|
|
492
|
+
yScaleFactor: 1,
|
|
493
|
+
containerWidth: event.width,
|
|
494
|
+
containerHeight: event.height,
|
|
495
|
+
position: {
|
|
496
|
+
mx: 0.57,
|
|
497
|
+
my: 0.263
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
501
|
+
return drawPath(parentGfx, pathData, {
|
|
502
|
+
strokeWidth: 1,
|
|
503
|
+
fill,
|
|
504
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
505
|
+
});
|
|
506
|
+
},
|
|
507
|
+
"bpmn:ErrorEventDefinition": function(parentGfx, event, isThrowing) {
|
|
508
|
+
var pathData = pathMap.getScaledPath("EVENT_ERROR", {
|
|
509
|
+
xScaleFactor: 1.1,
|
|
510
|
+
yScaleFactor: 1.1,
|
|
511
|
+
containerWidth: event.width,
|
|
512
|
+
containerHeight: event.height,
|
|
513
|
+
position: {
|
|
514
|
+
mx: 0.2,
|
|
515
|
+
my: 0.722
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
519
|
+
return drawPath(parentGfx, pathData, {
|
|
520
|
+
strokeWidth: 1,
|
|
521
|
+
fill,
|
|
522
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
523
|
+
});
|
|
524
|
+
},
|
|
525
|
+
"bpmn:CancelEventDefinition": function(parentGfx, event, isThrowing) {
|
|
526
|
+
var pathData = pathMap.getScaledPath("EVENT_CANCEL_45", {
|
|
527
|
+
xScaleFactor: 1,
|
|
528
|
+
yScaleFactor: 1,
|
|
529
|
+
containerWidth: event.width,
|
|
530
|
+
containerHeight: event.height,
|
|
531
|
+
position: {
|
|
532
|
+
mx: 0.638,
|
|
533
|
+
my: -0.055
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
537
|
+
var path = drawPath(parentGfx, pathData, {
|
|
538
|
+
strokeWidth: 1,
|
|
539
|
+
fill,
|
|
540
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
541
|
+
});
|
|
542
|
+
rotate(path, 45);
|
|
543
|
+
return path;
|
|
544
|
+
},
|
|
545
|
+
"bpmn:CompensateEventDefinition": function(parentGfx, event, isThrowing) {
|
|
546
|
+
var pathData = pathMap.getScaledPath("EVENT_COMPENSATION", {
|
|
547
|
+
xScaleFactor: 1,
|
|
548
|
+
yScaleFactor: 1,
|
|
549
|
+
containerWidth: event.width,
|
|
550
|
+
containerHeight: event.height,
|
|
551
|
+
position: {
|
|
552
|
+
mx: 0.22,
|
|
553
|
+
my: 0.5
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
557
|
+
return drawPath(parentGfx, pathData, {
|
|
558
|
+
strokeWidth: 1,
|
|
559
|
+
fill,
|
|
560
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
"bpmn:SignalEventDefinition": function(parentGfx, event, isThrowing) {
|
|
564
|
+
var pathData = pathMap.getScaledPath("EVENT_SIGNAL", {
|
|
565
|
+
xScaleFactor: 0.9,
|
|
566
|
+
yScaleFactor: 0.9,
|
|
567
|
+
containerWidth: event.width,
|
|
568
|
+
containerHeight: event.height,
|
|
569
|
+
position: {
|
|
570
|
+
mx: 0.5,
|
|
571
|
+
my: 0.2
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
575
|
+
return drawPath(parentGfx, pathData, {
|
|
576
|
+
strokeWidth: 1,
|
|
577
|
+
fill,
|
|
578
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
579
|
+
});
|
|
580
|
+
},
|
|
581
|
+
"bpmn:MultipleEventDefinition": function(parentGfx, event, isThrowing) {
|
|
582
|
+
var pathData = pathMap.getScaledPath("EVENT_MULTIPLE", {
|
|
583
|
+
xScaleFactor: 1.1,
|
|
584
|
+
yScaleFactor: 1.1,
|
|
585
|
+
containerWidth: event.width,
|
|
586
|
+
containerHeight: event.height,
|
|
587
|
+
position: {
|
|
588
|
+
mx: 0.222,
|
|
589
|
+
my: 0.36
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : "none";
|
|
593
|
+
return drawPath(parentGfx, pathData, {
|
|
594
|
+
strokeWidth: 1,
|
|
595
|
+
fill
|
|
596
|
+
});
|
|
597
|
+
},
|
|
598
|
+
"bpmn:ParallelMultipleEventDefinition": function(parentGfx, event) {
|
|
599
|
+
var pathData = pathMap.getScaledPath("EVENT_PARALLEL_MULTIPLE", {
|
|
600
|
+
xScaleFactor: 1.2,
|
|
601
|
+
yScaleFactor: 1.2,
|
|
602
|
+
containerWidth: event.width,
|
|
603
|
+
containerHeight: event.height,
|
|
604
|
+
position: {
|
|
605
|
+
mx: 0.458,
|
|
606
|
+
my: 0.194
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
return drawPath(parentGfx, pathData, {
|
|
610
|
+
strokeWidth: 1,
|
|
611
|
+
fill: getStrokeColor(event, defaultStrokeColor),
|
|
612
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
613
|
+
});
|
|
614
|
+
},
|
|
615
|
+
"bpmn:EndEvent": function(parentGfx, element) {
|
|
616
|
+
var circle = renderer("bpmn:Event")(parentGfx, element, {
|
|
617
|
+
strokeWidth: 4,
|
|
618
|
+
fill: getFillColor(element, defaultFillColor),
|
|
619
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
620
|
+
});
|
|
621
|
+
renderEventContent(element, parentGfx);
|
|
622
|
+
return circle;
|
|
623
|
+
},
|
|
624
|
+
"bpmn:TerminateEventDefinition": function(parentGfx, element) {
|
|
625
|
+
var circle = drawCircle(parentGfx, element.width, element.height, 8, {
|
|
626
|
+
strokeWidth: 4,
|
|
627
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
628
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
629
|
+
});
|
|
630
|
+
return circle;
|
|
631
|
+
},
|
|
632
|
+
"bpmn:IntermediateEvent": function(parentGfx, element) {
|
|
633
|
+
var outer = renderer("bpmn:Event")(parentGfx, element, {
|
|
634
|
+
strokeWidth: 1,
|
|
635
|
+
fill: getFillColor(element, defaultFillColor),
|
|
636
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
637
|
+
});
|
|
638
|
+
drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
|
|
639
|
+
strokeWidth: 1,
|
|
640
|
+
fill: getFillColor(element, "none"),
|
|
641
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
642
|
+
});
|
|
643
|
+
renderEventContent(element, parentGfx);
|
|
644
|
+
return outer;
|
|
645
|
+
},
|
|
646
|
+
"bpmn:IntermediateCatchEvent": as("bpmn:IntermediateEvent"),
|
|
647
|
+
"bpmn:IntermediateThrowEvent": as("bpmn:IntermediateEvent"),
|
|
648
|
+
"bpmn:Activity": function(parentGfx, element, attrs) {
|
|
649
|
+
attrs = attrs || {};
|
|
650
|
+
if (!("fillOpacity" in attrs)) {
|
|
651
|
+
attrs.fillOpacity = DEFAULT_FILL_OPACITY;
|
|
652
|
+
}
|
|
653
|
+
return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
|
|
654
|
+
},
|
|
655
|
+
"bpmn:Task": function(parentGfx, element) {
|
|
656
|
+
var attrs = {
|
|
657
|
+
fill: getFillColor(element, defaultFillColor),
|
|
658
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
659
|
+
};
|
|
660
|
+
var rect = renderer("bpmn:Activity")(parentGfx, element, attrs);
|
|
661
|
+
renderEmbeddedLabel(parentGfx, element, "center-middle");
|
|
662
|
+
attachTaskMarkers(parentGfx, element);
|
|
663
|
+
return rect;
|
|
664
|
+
},
|
|
665
|
+
"bpmn:ServiceTask": function(parentGfx, element) {
|
|
666
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
667
|
+
return task;
|
|
668
|
+
},
|
|
669
|
+
"bpmn:UserTask": function(parentGfx, element) {
|
|
670
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
671
|
+
return task;
|
|
672
|
+
},
|
|
673
|
+
"bpmn:ManualTask": function(parentGfx, element) {
|
|
674
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
675
|
+
var pathData = pathMap.getScaledPath("TASK_TYPE_MANUAL", {
|
|
676
|
+
abspos: {
|
|
677
|
+
x: 17,
|
|
678
|
+
y: 15
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
drawPath(parentGfx, pathData, {
|
|
682
|
+
strokeWidth: 0.5,
|
|
683
|
+
fill: getFillColor(element, defaultFillColor),
|
|
684
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
685
|
+
});
|
|
686
|
+
return task;
|
|
687
|
+
},
|
|
688
|
+
"bpmn:SendTask": function(parentGfx, element) {
|
|
689
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
690
|
+
var pathData = pathMap.getScaledPath("TASK_TYPE_SEND", {
|
|
691
|
+
xScaleFactor: 1,
|
|
692
|
+
yScaleFactor: 1,
|
|
693
|
+
containerWidth: 21,
|
|
694
|
+
containerHeight: 14,
|
|
695
|
+
position: {
|
|
696
|
+
mx: 0.285,
|
|
697
|
+
my: 0.357
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
drawPath(parentGfx, pathData, {
|
|
701
|
+
strokeWidth: 1,
|
|
702
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
703
|
+
stroke: getFillColor(element, defaultFillColor)
|
|
704
|
+
});
|
|
705
|
+
return task;
|
|
706
|
+
},
|
|
707
|
+
"bpmn:ReceiveTask": function(parentGfx, element) {
|
|
708
|
+
var semantic = getSemantic(element);
|
|
709
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
710
|
+
var pathData;
|
|
711
|
+
if (semantic.instantiate) {
|
|
712
|
+
drawCircle(parentGfx, 28, 28, 20 * 0.22, { strokeWidth: 1 });
|
|
713
|
+
pathData = pathMap.getScaledPath("TASK_TYPE_INSTANTIATING_SEND", {
|
|
714
|
+
abspos: {
|
|
715
|
+
x: 7.77,
|
|
716
|
+
y: 9.52
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
} else {
|
|
720
|
+
pathData = pathMap.getScaledPath("TASK_TYPE_SEND", {
|
|
721
|
+
xScaleFactor: 0.9,
|
|
722
|
+
yScaleFactor: 0.9,
|
|
723
|
+
containerWidth: 21,
|
|
724
|
+
containerHeight: 14,
|
|
725
|
+
position: {
|
|
726
|
+
mx: 0.3,
|
|
727
|
+
my: 0.4
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
drawPath(parentGfx, pathData, {
|
|
732
|
+
strokeWidth: 1,
|
|
733
|
+
fill: getFillColor(element, defaultFillColor),
|
|
734
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
735
|
+
});
|
|
736
|
+
return task;
|
|
737
|
+
},
|
|
738
|
+
"bpmn:ScriptTask": function(parentGfx, element) {
|
|
739
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
740
|
+
return task;
|
|
741
|
+
},
|
|
742
|
+
"bpmn:BusinessRuleTask": function(parentGfx, element) {
|
|
743
|
+
var task = renderer("bpmn:Task")(parentGfx, element);
|
|
744
|
+
var headerPathData = pathMap.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER", {
|
|
745
|
+
abspos: {
|
|
746
|
+
x: 8,
|
|
747
|
+
y: 8
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
var businessHeaderPath = drawPath(parentGfx, headerPathData);
|
|
751
|
+
attr(businessHeaderPath, {
|
|
752
|
+
strokeWidth: 1,
|
|
753
|
+
fill: getFillColor(element, "#aaaaaa"),
|
|
754
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
755
|
+
});
|
|
756
|
+
var headerData = pathMap.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN", {
|
|
757
|
+
abspos: {
|
|
758
|
+
x: 8,
|
|
759
|
+
y: 8
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
var businessPath = drawPath(parentGfx, headerData);
|
|
763
|
+
attr(businessPath, {
|
|
764
|
+
strokeWidth: 1,
|
|
765
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
766
|
+
});
|
|
767
|
+
return task;
|
|
768
|
+
},
|
|
769
|
+
"bpmn:SubProcess": function(parentGfx, element, attrs) {
|
|
770
|
+
attrs = assign({
|
|
771
|
+
fill: getFillColor(element, defaultFillColor),
|
|
772
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
773
|
+
}, attrs);
|
|
774
|
+
var rect = renderer("bpmn:Activity")(parentGfx, element, attrs);
|
|
775
|
+
var expanded = isExpanded(element);
|
|
776
|
+
if (isEventSubProcess(element)) {
|
|
777
|
+
attr(rect, {
|
|
778
|
+
strokeDasharray: "1,2"
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
renderEmbeddedLabel(parentGfx, element, expanded ? "center-top" : "center-middle");
|
|
782
|
+
if (expanded) {
|
|
783
|
+
attachTaskMarkers(parentGfx, element);
|
|
784
|
+
} else {
|
|
785
|
+
attachTaskMarkers(parentGfx, element, ["SubProcessMarker"]);
|
|
786
|
+
}
|
|
787
|
+
return rect;
|
|
788
|
+
},
|
|
789
|
+
"bpmn:AdHocSubProcess": function(parentGfx, element) {
|
|
790
|
+
return renderer("bpmn:SubProcess")(parentGfx, element);
|
|
791
|
+
},
|
|
792
|
+
"bpmn:Transaction": function(parentGfx, element) {
|
|
793
|
+
var outer = renderer("bpmn:SubProcess")(parentGfx, element);
|
|
794
|
+
var innerAttrs = styles.style(["no-fill", "no-events"], {
|
|
795
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
796
|
+
});
|
|
797
|
+
drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST, innerAttrs);
|
|
798
|
+
return outer;
|
|
799
|
+
},
|
|
800
|
+
"bpmn:CallActivity": function(parentGfx, element) {
|
|
801
|
+
return renderer("bpmn:SubProcess")(parentGfx, element, {
|
|
802
|
+
strokeWidth: 5
|
|
803
|
+
});
|
|
804
|
+
},
|
|
805
|
+
"bpmn:Participant": function(parentGfx, element) {
|
|
806
|
+
var attrs = {
|
|
807
|
+
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
808
|
+
fill: getFillColor(element, defaultFillColor),
|
|
809
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
810
|
+
};
|
|
811
|
+
var lane = renderer("bpmn:Lane")(parentGfx, element, attrs);
|
|
812
|
+
var expandedPool = isExpanded(element);
|
|
813
|
+
if (expandedPool) {
|
|
814
|
+
drawLine(parentGfx, [
|
|
815
|
+
{ x: 30, y: 0 },
|
|
816
|
+
{ x: 30, y: element.height }
|
|
817
|
+
], {
|
|
818
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
819
|
+
});
|
|
820
|
+
var text = getSemantic(element).name;
|
|
821
|
+
renderLaneLabel(parentGfx, text, element);
|
|
822
|
+
} else {
|
|
823
|
+
var text2 = getSemantic(element).name;
|
|
824
|
+
renderLabel(parentGfx, text2, {
|
|
825
|
+
box: element,
|
|
826
|
+
align: "center-middle",
|
|
827
|
+
style: {
|
|
828
|
+
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
var participantMultiplicity = !!getSemantic(element).participantMultiplicity;
|
|
833
|
+
if (participantMultiplicity) {
|
|
834
|
+
renderer("ParticipantMultiplicityMarker")(parentGfx, element);
|
|
835
|
+
}
|
|
836
|
+
return lane;
|
|
837
|
+
},
|
|
838
|
+
"bpmn:Lane": function(parentGfx, element, attrs) {
|
|
839
|
+
var rect = drawRect(parentGfx, element.width, element.height, 0, assign({
|
|
840
|
+
fill: getFillColor(element, defaultFillColor),
|
|
841
|
+
fillOpacity: HIGH_FILL_OPACITY,
|
|
842
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
843
|
+
}, attrs));
|
|
844
|
+
var semantic = getSemantic(element);
|
|
845
|
+
if (semantic.$type === "bpmn:Lane") {
|
|
846
|
+
var text = semantic.name;
|
|
847
|
+
renderLaneLabel(parentGfx, text, element);
|
|
848
|
+
}
|
|
849
|
+
return rect;
|
|
850
|
+
},
|
|
851
|
+
"bpmn:InclusiveGateway": function(parentGfx, element) {
|
|
852
|
+
var diamond = renderer("bpmn:Gateway")(parentGfx, element);
|
|
853
|
+
drawCircle(parentGfx, element.width, element.height, element.height * 0.24, {
|
|
854
|
+
strokeWidth: 2.5,
|
|
855
|
+
fill: getFillColor(element, defaultFillColor),
|
|
856
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
857
|
+
});
|
|
858
|
+
return diamond;
|
|
859
|
+
},
|
|
860
|
+
"bpmn:ExclusiveGateway": function(parentGfx, element) {
|
|
861
|
+
var diamond = renderer("bpmn:Gateway")(parentGfx, element);
|
|
862
|
+
var pathData = pathMap.getScaledPath("GATEWAY_EXCLUSIVE", {
|
|
863
|
+
xScaleFactor: 0.4,
|
|
864
|
+
yScaleFactor: 0.4,
|
|
865
|
+
containerWidth: element.width,
|
|
866
|
+
containerHeight: element.height,
|
|
867
|
+
position: {
|
|
868
|
+
mx: 0.32,
|
|
869
|
+
my: 0.3
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
if (getDi(element).isMarkerVisible) {
|
|
873
|
+
drawPath(parentGfx, pathData, {
|
|
874
|
+
strokeWidth: 1,
|
|
875
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
876
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
return diamond;
|
|
880
|
+
},
|
|
881
|
+
"bpmn:ComplexGateway": function(parentGfx, element) {
|
|
882
|
+
var diamond = renderer("bpmn:Gateway")(parentGfx, element);
|
|
883
|
+
var pathData = pathMap.getScaledPath("GATEWAY_COMPLEX", {
|
|
884
|
+
xScaleFactor: 0.5,
|
|
885
|
+
yScaleFactor: 0.5,
|
|
886
|
+
containerWidth: element.width,
|
|
887
|
+
containerHeight: element.height,
|
|
888
|
+
position: {
|
|
889
|
+
mx: 0.46,
|
|
890
|
+
my: 0.26
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
drawPath(parentGfx, pathData, {
|
|
894
|
+
strokeWidth: 1,
|
|
895
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
896
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
897
|
+
});
|
|
898
|
+
return diamond;
|
|
899
|
+
},
|
|
900
|
+
"bpmn:ParallelGateway": function(parentGfx, element) {
|
|
901
|
+
var diamond = renderer("bpmn:Gateway")(parentGfx, element);
|
|
902
|
+
var pathData = pathMap.getScaledPath("GATEWAY_PARALLEL", {
|
|
903
|
+
xScaleFactor: 0.6,
|
|
904
|
+
yScaleFactor: 0.6,
|
|
905
|
+
containerWidth: element.width,
|
|
906
|
+
containerHeight: element.height,
|
|
907
|
+
position: {
|
|
908
|
+
mx: 0.46,
|
|
909
|
+
my: 0.2
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
drawPath(parentGfx, pathData, {
|
|
913
|
+
strokeWidth: 1,
|
|
914
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
915
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
916
|
+
});
|
|
917
|
+
return diamond;
|
|
918
|
+
},
|
|
919
|
+
"bpmn:EventBasedGateway": function(parentGfx, element) {
|
|
920
|
+
var semantic = getSemantic(element);
|
|
921
|
+
var diamond = renderer("bpmn:Gateway")(parentGfx, element);
|
|
922
|
+
drawCircle(parentGfx, element.width, element.height, element.height * 0.2, {
|
|
923
|
+
strokeWidth: 1,
|
|
924
|
+
fill: "none",
|
|
925
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
926
|
+
});
|
|
927
|
+
var type = semantic.eventGatewayType;
|
|
928
|
+
var instantiate = !!semantic.instantiate;
|
|
929
|
+
function drawEvent() {
|
|
930
|
+
var pathData2 = pathMap.getScaledPath("GATEWAY_EVENT_BASED", {
|
|
931
|
+
xScaleFactor: 0.18,
|
|
932
|
+
yScaleFactor: 0.18,
|
|
933
|
+
containerWidth: element.width,
|
|
934
|
+
containerHeight: element.height,
|
|
935
|
+
position: {
|
|
936
|
+
mx: 0.36,
|
|
937
|
+
my: 0.44
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
var attrs = {
|
|
941
|
+
strokeWidth: 2,
|
|
942
|
+
fill: getFillColor(element, "none"),
|
|
943
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
944
|
+
};
|
|
945
|
+
drawPath(parentGfx, pathData2, attrs);
|
|
946
|
+
}
|
|
947
|
+
if (type === "Parallel") {
|
|
948
|
+
var pathData = pathMap.getScaledPath("GATEWAY_PARALLEL", {
|
|
949
|
+
xScaleFactor: 0.4,
|
|
950
|
+
yScaleFactor: 0.4,
|
|
951
|
+
containerWidth: element.width,
|
|
952
|
+
containerHeight: element.height,
|
|
953
|
+
position: {
|
|
954
|
+
mx: 0.474,
|
|
955
|
+
my: 0.296
|
|
956
|
+
}
|
|
957
|
+
});
|
|
958
|
+
var parallelPath = drawPath(parentGfx, pathData);
|
|
959
|
+
attr(parallelPath, {
|
|
960
|
+
strokeWidth: 1,
|
|
961
|
+
fill: "none"
|
|
962
|
+
});
|
|
963
|
+
} else if (type === "Exclusive") {
|
|
964
|
+
if (!instantiate) {
|
|
965
|
+
var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
|
|
966
|
+
attr(innerCircle, {
|
|
967
|
+
strokeWidth: 1,
|
|
968
|
+
fill: "none",
|
|
969
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
drawEvent();
|
|
973
|
+
}
|
|
974
|
+
return diamond;
|
|
975
|
+
},
|
|
976
|
+
"bpmn:Gateway": function(parentGfx, element) {
|
|
977
|
+
var attrs = {
|
|
978
|
+
fill: getFillColor(element, defaultFillColor),
|
|
979
|
+
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
980
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
981
|
+
};
|
|
982
|
+
return drawDiamond(parentGfx, element.width, element.height, attrs);
|
|
983
|
+
},
|
|
984
|
+
"bpmn:SequenceFlow": function(parentGfx, element) {
|
|
985
|
+
var pathData = createPathFromConnection(element);
|
|
986
|
+
var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
|
|
987
|
+
var attrs = {
|
|
988
|
+
strokeLinejoin: "round",
|
|
989
|
+
markerEnd: marker("sequenceflow-end", fill, stroke),
|
|
990
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
991
|
+
};
|
|
992
|
+
var path = drawPath(parentGfx, pathData, attrs);
|
|
993
|
+
var sequenceFlow = getSemantic(element);
|
|
994
|
+
var source;
|
|
995
|
+
if (element.source) {
|
|
996
|
+
source = element.source.businessObject;
|
|
997
|
+
if (sequenceFlow.conditionExpression && source.$instanceOf("bpmn:Activity")) {
|
|
998
|
+
attr(path, {
|
|
999
|
+
markerStart: marker("conditional-flow-marker", fill, stroke)
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
if (source.default && (source.$instanceOf("bpmn:Gateway") || source.$instanceOf("bpmn:Activity")) && source.default === sequenceFlow) {
|
|
1003
|
+
attr(path, {
|
|
1004
|
+
markerStart: marker("conditional-default-flow-marker", fill, stroke)
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
return path;
|
|
1009
|
+
},
|
|
1010
|
+
"bpmn:Association": function(parentGfx, element, attrs) {
|
|
1011
|
+
var semantic = getSemantic(element);
|
|
1012
|
+
var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1013
|
+
attrs = assign({
|
|
1014
|
+
strokeDasharray: "0.5, 5",
|
|
1015
|
+
strokeLinecap: "round",
|
|
1016
|
+
strokeLinejoin: "round",
|
|
1017
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1018
|
+
}, attrs || {});
|
|
1019
|
+
if (semantic.associationDirection === "One" || semantic.associationDirection === "Both") {
|
|
1020
|
+
attrs.markerEnd = marker("association-end", fill, stroke);
|
|
1021
|
+
}
|
|
1022
|
+
if (semantic.associationDirection === "Both") {
|
|
1023
|
+
attrs.markerStart = marker("association-start", fill, stroke);
|
|
1024
|
+
}
|
|
1025
|
+
return drawLine(parentGfx, element.waypoints, attrs);
|
|
1026
|
+
},
|
|
1027
|
+
"bpmn:DataInputAssociation": function(parentGfx, element) {
|
|
1028
|
+
var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1029
|
+
return renderer("bpmn:Association")(parentGfx, element, {
|
|
1030
|
+
markerEnd: marker("association-end", fill, stroke)
|
|
1031
|
+
});
|
|
1032
|
+
},
|
|
1033
|
+
"bpmn:DataOutputAssociation": function(parentGfx, element) {
|
|
1034
|
+
var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1035
|
+
return renderer("bpmn:Association")(parentGfx, element, {
|
|
1036
|
+
markerEnd: marker("association-end", fill, stroke)
|
|
1037
|
+
});
|
|
1038
|
+
},
|
|
1039
|
+
"bpmn:MessageFlow": function(parentGfx, element) {
|
|
1040
|
+
var semantic = getSemantic(element), di = getDi(element);
|
|
1041
|
+
var fill = getFillColor(element, defaultFillColor), stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1042
|
+
var pathData = createPathFromConnection(element);
|
|
1043
|
+
var attrs = {
|
|
1044
|
+
markerEnd: marker("messageflow-end", fill, stroke),
|
|
1045
|
+
markerStart: marker("messageflow-start", fill, stroke),
|
|
1046
|
+
strokeDasharray: "10, 12",
|
|
1047
|
+
strokeLinecap: "round",
|
|
1048
|
+
strokeLinejoin: "round",
|
|
1049
|
+
strokeWidth: "1.5px",
|
|
1050
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1051
|
+
};
|
|
1052
|
+
var path = drawPath(parentGfx, pathData, attrs);
|
|
1053
|
+
if (semantic.messageRef) {
|
|
1054
|
+
var midPoint = path.getPointAtLength(path.getTotalLength() / 2);
|
|
1055
|
+
var markerPathData = pathMap.getScaledPath("MESSAGE_FLOW_MARKER", {
|
|
1056
|
+
abspos: {
|
|
1057
|
+
x: midPoint.x,
|
|
1058
|
+
y: midPoint.y
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
var messageAttrs = { strokeWidth: 1 };
|
|
1062
|
+
if (di.messageVisibleKind === "initiating") {
|
|
1063
|
+
messageAttrs.fill = "white";
|
|
1064
|
+
messageAttrs.stroke = "black";
|
|
1065
|
+
} else {
|
|
1066
|
+
messageAttrs.fill = "#888";
|
|
1067
|
+
messageAttrs.stroke = "white";
|
|
1068
|
+
}
|
|
1069
|
+
var message = drawPath(parentGfx, markerPathData, messageAttrs);
|
|
1070
|
+
var labelText = semantic.messageRef.name;
|
|
1071
|
+
var label = renderLabel(parentGfx, labelText, {
|
|
1072
|
+
align: "center-top",
|
|
1073
|
+
fitBox: true,
|
|
1074
|
+
style: {
|
|
1075
|
+
fill: getStrokeColor(element, defaultLabelColor, defaultStrokeColor)
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
var messageBounds = message.getBBox(), labelBounds = label.getBBox();
|
|
1079
|
+
var translateX = midPoint.x - labelBounds.width / 2, translateY = midPoint.y + messageBounds.height / 2 + ELEMENT_LABEL_DISTANCE;
|
|
1080
|
+
transform(label, translateX, translateY, 0);
|
|
1081
|
+
}
|
|
1082
|
+
return path;
|
|
1083
|
+
},
|
|
1084
|
+
"bpmn:DataObject": function(parentGfx, element) {
|
|
1085
|
+
var pathData = pathMap.getScaledPath("DATA_OBJECT_PATH", {
|
|
1086
|
+
xScaleFactor: 1,
|
|
1087
|
+
yScaleFactor: 1,
|
|
1088
|
+
containerWidth: element.width,
|
|
1089
|
+
containerHeight: element.height,
|
|
1090
|
+
position: {
|
|
1091
|
+
mx: 0.474,
|
|
1092
|
+
my: 0.296
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
var elementObject = drawPath(parentGfx, pathData, {
|
|
1096
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1097
|
+
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1098
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1099
|
+
});
|
|
1100
|
+
var semantic = getSemantic(element);
|
|
1101
|
+
if (isCollection(semantic)) {
|
|
1102
|
+
renderDataItemCollection(parentGfx, element);
|
|
1103
|
+
}
|
|
1104
|
+
return elementObject;
|
|
1105
|
+
},
|
|
1106
|
+
"bpmn:DataObjectReference": as("bpmn:DataObject"),
|
|
1107
|
+
"bpmn:DataInput": function(parentGfx, element) {
|
|
1108
|
+
var arrowPathData = pathMap.getRawPath("DATA_ARROW");
|
|
1109
|
+
var elementObject = renderer("bpmn:DataObject")(parentGfx, element);
|
|
1110
|
+
drawPath(parentGfx, arrowPathData, { strokeWidth: 1 });
|
|
1111
|
+
return elementObject;
|
|
1112
|
+
},
|
|
1113
|
+
"bpmn:DataOutput": function(parentGfx, element) {
|
|
1114
|
+
var arrowPathData = pathMap.getRawPath("DATA_ARROW");
|
|
1115
|
+
var elementObject = renderer("bpmn:DataObject")(parentGfx, element);
|
|
1116
|
+
drawPath(parentGfx, arrowPathData, {
|
|
1117
|
+
strokeWidth: 1,
|
|
1118
|
+
fill: "black"
|
|
1119
|
+
});
|
|
1120
|
+
return elementObject;
|
|
1121
|
+
},
|
|
1122
|
+
"bpmn:DataStoreReference": function(parentGfx, element) {
|
|
1123
|
+
var DATA_STORE_PATH = pathMap.getScaledPath("DATA_STORE", {
|
|
1124
|
+
xScaleFactor: 1,
|
|
1125
|
+
yScaleFactor: 1,
|
|
1126
|
+
containerWidth: element.width,
|
|
1127
|
+
containerHeight: element.height,
|
|
1128
|
+
position: {
|
|
1129
|
+
mx: 0,
|
|
1130
|
+
my: 0.133
|
|
1131
|
+
}
|
|
1132
|
+
});
|
|
1133
|
+
var elementStore = drawPath(parentGfx, DATA_STORE_PATH, {
|
|
1134
|
+
strokeWidth: 2,
|
|
1135
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1136
|
+
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1137
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1138
|
+
});
|
|
1139
|
+
return elementStore;
|
|
1140
|
+
},
|
|
1141
|
+
"bpmn:BoundaryEvent": function(parentGfx, element) {
|
|
1142
|
+
var semantic = getSemantic(element), cancel = semantic.cancelActivity;
|
|
1143
|
+
var attrs = {
|
|
1144
|
+
strokeWidth: 1,
|
|
1145
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1146
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1147
|
+
};
|
|
1148
|
+
if (!cancel) {
|
|
1149
|
+
attrs.strokeDasharray = "6";
|
|
1150
|
+
attrs.strokeLinecap = "round";
|
|
1151
|
+
}
|
|
1152
|
+
var outerAttrs = assign({}, attrs, {
|
|
1153
|
+
fillOpacity: 1
|
|
1154
|
+
});
|
|
1155
|
+
var innerAttrs = assign({}, attrs, {
|
|
1156
|
+
fill: "none"
|
|
1157
|
+
});
|
|
1158
|
+
var outer = renderer("bpmn:Event")(parentGfx, element, outerAttrs);
|
|
1159
|
+
drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
|
1160
|
+
renderEventContent(element, parentGfx);
|
|
1161
|
+
return outer;
|
|
1162
|
+
},
|
|
1163
|
+
"bpmn:Group": function(parentGfx, element) {
|
|
1164
|
+
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
|
|
1165
|
+
stroke: getStrokeColor(element, defaultStrokeColor),
|
|
1166
|
+
strokeWidth: 1,
|
|
1167
|
+
strokeDasharray: "8,3,1,3",
|
|
1168
|
+
fill: "none",
|
|
1169
|
+
pointerEvents: "none"
|
|
1170
|
+
});
|
|
1171
|
+
return group;
|
|
1172
|
+
},
|
|
1173
|
+
label: function(parentGfx, element) {
|
|
1174
|
+
return renderExternalLabel(parentGfx, element);
|
|
1175
|
+
},
|
|
1176
|
+
"bpmn:TextAnnotation": function(parentGfx, element) {
|
|
1177
|
+
var style = {
|
|
1178
|
+
fill: "none",
|
|
1179
|
+
stroke: "none"
|
|
1180
|
+
};
|
|
1181
|
+
var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style);
|
|
1182
|
+
var textPathData = pathMap.getScaledPath("TEXT_ANNOTATION", {
|
|
1183
|
+
xScaleFactor: 1,
|
|
1184
|
+
yScaleFactor: 1,
|
|
1185
|
+
containerWidth: element.width,
|
|
1186
|
+
containerHeight: element.height,
|
|
1187
|
+
position: {
|
|
1188
|
+
mx: 0,
|
|
1189
|
+
my: 0
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
drawPath(parentGfx, textPathData, {
|
|
1193
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1194
|
+
});
|
|
1195
|
+
var text = getSemantic(element).text || "";
|
|
1196
|
+
renderLabel(parentGfx, text, {
|
|
1197
|
+
box: element,
|
|
1198
|
+
align: "left-top",
|
|
1199
|
+
padding: 5,
|
|
1200
|
+
style: {
|
|
1201
|
+
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
1202
|
+
}
|
|
1203
|
+
});
|
|
1204
|
+
return textElement;
|
|
1205
|
+
},
|
|
1206
|
+
ParticipantMultiplicityMarker: function(parentGfx, element) {
|
|
1207
|
+
var markerPath = pathMap.getScaledPath("MARKER_PARALLEL", {
|
|
1208
|
+
xScaleFactor: 1,
|
|
1209
|
+
yScaleFactor: 1,
|
|
1210
|
+
containerWidth: element.width,
|
|
1211
|
+
containerHeight: element.height,
|
|
1212
|
+
position: {
|
|
1213
|
+
mx: element.width / 2 / element.width,
|
|
1214
|
+
my: (element.height - 15) / element.height
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
drawMarker("participant-multiplicity", parentGfx, markerPath, {
|
|
1218
|
+
strokeWidth: 2,
|
|
1219
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1220
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1221
|
+
});
|
|
1222
|
+
},
|
|
1223
|
+
SubProcessMarker: function(parentGfx, element) {
|
|
1224
|
+
var markerRect = drawRect(parentGfx, 14, 14, 0, {
|
|
1225
|
+
strokeWidth: 1,
|
|
1226
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1227
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1228
|
+
});
|
|
1229
|
+
translate(markerRect, element.width / 2 - 7.5, element.height - 20);
|
|
1230
|
+
var markerPath = pathMap.getScaledPath("MARKER_SUB_PROCESS", {
|
|
1231
|
+
xScaleFactor: 1.5,
|
|
1232
|
+
yScaleFactor: 1.5,
|
|
1233
|
+
containerWidth: element.width,
|
|
1234
|
+
containerHeight: element.height,
|
|
1235
|
+
position: {
|
|
1236
|
+
mx: (element.width / 2 - 7.5) / element.width,
|
|
1237
|
+
my: (element.height - 20) / element.height
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
drawMarker("sub-process", parentGfx, markerPath, {
|
|
1241
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1242
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1243
|
+
});
|
|
1244
|
+
},
|
|
1245
|
+
ParallelMarker: function(parentGfx, element, position) {
|
|
1246
|
+
var markerPath = pathMap.getScaledPath("MARKER_PARALLEL", {
|
|
1247
|
+
xScaleFactor: 1,
|
|
1248
|
+
yScaleFactor: 1,
|
|
1249
|
+
containerWidth: element.width,
|
|
1250
|
+
containerHeight: element.height,
|
|
1251
|
+
position: {
|
|
1252
|
+
mx: (element.width / 2 + position.parallel) / element.width,
|
|
1253
|
+
my: (element.height - 20) / element.height
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
drawMarker("parallel", parentGfx, markerPath, {
|
|
1257
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1258
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1259
|
+
});
|
|
1260
|
+
},
|
|
1261
|
+
SequentialMarker: function(parentGfx, element, position) {
|
|
1262
|
+
var markerPath = pathMap.getScaledPath("MARKER_SEQUENTIAL", {
|
|
1263
|
+
xScaleFactor: 1,
|
|
1264
|
+
yScaleFactor: 1,
|
|
1265
|
+
containerWidth: element.width,
|
|
1266
|
+
containerHeight: element.height,
|
|
1267
|
+
position: {
|
|
1268
|
+
mx: (element.width / 2 + position.seq) / element.width,
|
|
1269
|
+
my: (element.height - 19) / element.height
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1272
|
+
drawMarker("sequential", parentGfx, markerPath, {
|
|
1273
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1274
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1275
|
+
});
|
|
1276
|
+
},
|
|
1277
|
+
CompensationMarker: function(parentGfx, element, position) {
|
|
1278
|
+
var markerMath = pathMap.getScaledPath("MARKER_COMPENSATION", {
|
|
1279
|
+
xScaleFactor: 1,
|
|
1280
|
+
yScaleFactor: 1,
|
|
1281
|
+
containerWidth: element.width,
|
|
1282
|
+
containerHeight: element.height,
|
|
1283
|
+
position: {
|
|
1284
|
+
mx: (element.width / 2 + position.compensation) / element.width,
|
|
1285
|
+
my: (element.height - 13) / element.height
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
drawMarker("compensation", parentGfx, markerMath, {
|
|
1289
|
+
strokeWidth: 1,
|
|
1290
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1291
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1292
|
+
});
|
|
1293
|
+
},
|
|
1294
|
+
LoopMarker: function(parentGfx, element, position) {
|
|
1295
|
+
var markerPath = pathMap.getScaledPath("MARKER_LOOP", {
|
|
1296
|
+
xScaleFactor: 1,
|
|
1297
|
+
yScaleFactor: 1,
|
|
1298
|
+
containerWidth: element.width,
|
|
1299
|
+
containerHeight: element.height,
|
|
1300
|
+
position: {
|
|
1301
|
+
mx: (element.width / 2 + position.loop) / element.width,
|
|
1302
|
+
my: (element.height - 7) / element.height
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
drawMarker("loop", parentGfx, markerPath, {
|
|
1306
|
+
strokeWidth: 1,
|
|
1307
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1308
|
+
stroke: getStrokeColor(element, defaultStrokeColor),
|
|
1309
|
+
strokeLinecap: "round",
|
|
1310
|
+
strokeMiterlimit: 0.5
|
|
1311
|
+
});
|
|
1312
|
+
},
|
|
1313
|
+
AdhocMarker: function(parentGfx, element, position) {
|
|
1314
|
+
var markerPath = pathMap.getScaledPath("MARKER_ADHOC", {
|
|
1315
|
+
xScaleFactor: 1,
|
|
1316
|
+
yScaleFactor: 1,
|
|
1317
|
+
containerWidth: element.width,
|
|
1318
|
+
containerHeight: element.height,
|
|
1319
|
+
position: {
|
|
1320
|
+
mx: (element.width / 2 + position.adhoc) / element.width,
|
|
1321
|
+
my: (element.height - 15) / element.height
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
drawMarker("adhoc", parentGfx, markerPath, {
|
|
1325
|
+
strokeWidth: 1,
|
|
1326
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1327
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1331
|
+
function attachTaskMarkers(parentGfx, element, taskMarkers) {
|
|
1332
|
+
var obj = getSemantic(element);
|
|
1333
|
+
var subprocess = taskMarkers && taskMarkers.indexOf("SubProcessMarker") !== -1;
|
|
1334
|
+
var position;
|
|
1335
|
+
if (subprocess) {
|
|
1336
|
+
position = {
|
|
1337
|
+
seq: -21,
|
|
1338
|
+
parallel: -22,
|
|
1339
|
+
compensation: -42,
|
|
1340
|
+
loop: -18,
|
|
1341
|
+
adhoc: 10
|
|
1342
|
+
};
|
|
1343
|
+
} else {
|
|
1344
|
+
position = {
|
|
1345
|
+
seq: -3,
|
|
1346
|
+
parallel: -6,
|
|
1347
|
+
compensation: -27,
|
|
1348
|
+
loop: 0,
|
|
1349
|
+
adhoc: 10
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
forEach(taskMarkers, function(marker2) {
|
|
1353
|
+
renderer(marker2)(parentGfx, element, position);
|
|
1354
|
+
});
|
|
1355
|
+
if (obj.isForCompensation) {
|
|
1356
|
+
renderer("CompensationMarker")(parentGfx, element, position);
|
|
1357
|
+
}
|
|
1358
|
+
if (obj.$type === "bpmn:AdHocSubProcess") {
|
|
1359
|
+
renderer("AdhocMarker")(parentGfx, element, position);
|
|
1360
|
+
}
|
|
1361
|
+
var loopCharacteristics = obj.loopCharacteristics, isSequential = loopCharacteristics && loopCharacteristics.isSequential;
|
|
1362
|
+
if (loopCharacteristics) {
|
|
1363
|
+
if (isSequential === void 0) {
|
|
1364
|
+
renderer("LoopMarker")(parentGfx, element, position);
|
|
1365
|
+
}
|
|
1366
|
+
if (isSequential === false) {
|
|
1367
|
+
renderer("ParallelMarker")(parentGfx, element, position);
|
|
1368
|
+
}
|
|
1369
|
+
if (isSequential === true) {
|
|
1370
|
+
renderer("SequentialMarker")(parentGfx, element, position);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
function renderDataItemCollection(parentGfx, element) {
|
|
1375
|
+
var yPosition = (element.height - 18) / element.height;
|
|
1376
|
+
var pathData = pathMap.getScaledPath("DATA_OBJECT_COLLECTION_PATH", {
|
|
1377
|
+
xScaleFactor: 1,
|
|
1378
|
+
yScaleFactor: 1,
|
|
1379
|
+
containerWidth: element.width,
|
|
1380
|
+
containerHeight: element.height,
|
|
1381
|
+
position: {
|
|
1382
|
+
mx: 0.33,
|
|
1383
|
+
my: yPosition
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
drawPath(parentGfx, pathData, {
|
|
1387
|
+
strokeWidth: 2
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
this._drawPath = drawPath;
|
|
1391
|
+
}
|
|
1392
|
+
inherits(BpmnRenderer, BaseRenderer);
|
|
1393
|
+
BpmnRenderer.$inject = [
|
|
1394
|
+
"config.bpmnRenderer",
|
|
1395
|
+
"eventBus",
|
|
1396
|
+
"styles",
|
|
1397
|
+
"pathMap",
|
|
1398
|
+
"canvas",
|
|
1399
|
+
"textRenderer"
|
|
1400
|
+
];
|
|
1401
|
+
BpmnRenderer.prototype.canRender = function(element) {
|
|
1402
|
+
return is(element, "bpmn:BaseElement");
|
|
1403
|
+
};
|
|
1404
|
+
BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
1405
|
+
var type = element.type;
|
|
1406
|
+
var h = this.handlers[type];
|
|
1407
|
+
return h(parentGfx, element);
|
|
1408
|
+
};
|
|
1409
|
+
BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
|
|
1410
|
+
var type = element.type;
|
|
1411
|
+
var h = this.handlers[type];
|
|
1412
|
+
return h(parentGfx, element);
|
|
1413
|
+
};
|
|
1414
|
+
BpmnRenderer.prototype.getShapePath = function(element) {
|
|
1415
|
+
if (is(element, "bpmn:Event")) {
|
|
1416
|
+
return getCirclePath(element);
|
|
1417
|
+
}
|
|
1418
|
+
if (is(element, "bpmn:Activity")) {
|
|
1419
|
+
return getRoundRectPath(element, TASK_BORDER_RADIUS);
|
|
1420
|
+
}
|
|
1421
|
+
if (is(element, "bpmn:Gateway")) {
|
|
1422
|
+
return getDiamondPath(element);
|
|
1423
|
+
}
|
|
1424
|
+
return getRectPath(element);
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
export { BpmnRenderer as default };
|