@operato/scene-bpmn 8.0.0-beta.1 → 8.0.0
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/package.json +5 -5
- package/CHANGELOG.md +0 -400
- package/src/base/bpmn-activity.ts +0 -32
- package/src/base/bpmn-container-base.ts +0 -201
- package/src/base/bpmn-control-base.ts +0 -201
- package/src/bpmn-comment.ts +0 -64
- package/src/bpmn-data-object.ts +0 -181
- package/src/bpmn-data-store.ts +0 -63
- package/src/bpmn-event.ts +0 -468
- package/src/bpmn-expanded-subprocess.ts +0 -207
- package/src/bpmn-flow.ts +0 -37
- package/src/bpmn-gateway.ts +0 -181
- package/src/bpmn-group.ts +0 -39
- package/src/bpmn-lane.ts +0 -125
- package/src/bpmn-message.ts +0 -57
- package/src/bpmn-pool.ts +0 -25
- package/src/bpmn-subprocess.ts +0 -323
- package/src/bpmn-task.ts +0 -479
- package/src/characteristics/loop.ts +0 -0
- package/src/editors/index.ts +0 -0
- package/src/groups/index.ts +0 -3
- package/src/groups/process.ts +0 -48
- package/src/index.ts +0 -13
- package/src/templates/bpmn-comment.ts +0 -24
- package/src/templates/bpmn-data-object.ts +0 -21
- package/src/templates/bpmn-data-store.ts +0 -19
- package/src/templates/bpmn-event.ts +0 -19
- package/src/templates/bpmn-expanded-subprocess.ts +0 -24
- package/src/templates/bpmn-flow.ts +0 -23
- package/src/templates/bpmn-gateway.ts +0 -19
- package/src/templates/bpmn-group.ts +0 -20
- package/src/templates/bpmn-lane.ts +0 -20
- package/src/templates/bpmn-message.ts +0 -21
- package/src/templates/bpmn-pool.ts +0 -18
- package/src/templates/bpmn-subprocess.ts +0 -18
- package/src/templates/bpmn-task.ts +0 -18
- package/src/templates/index.ts +0 -31
- package/tsconfig.json +0 -24
- package/tsconfig.tsbuildinfo +0 -1
package/src/bpmn-flow.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature, OrthoLine } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
const NATURE: ComponentNature = {
|
|
4
|
-
mutable: false,
|
|
5
|
-
resizable: false,
|
|
6
|
-
rotatable: false,
|
|
7
|
-
properties: [
|
|
8
|
-
{
|
|
9
|
-
type: 'number',
|
|
10
|
-
label: 'round',
|
|
11
|
-
name: 'round',
|
|
12
|
-
property: {
|
|
13
|
-
min: 0,
|
|
14
|
-
max: 100,
|
|
15
|
-
step: 1
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
type: 'checkbox',
|
|
20
|
-
label: 'default',
|
|
21
|
-
name: 'default'
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
help: 'bpmn/flow/flow'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default class BPMNFlow extends OrthoLine {
|
|
28
|
-
get nature() {
|
|
29
|
-
return NATURE
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
get pathExtendable() {
|
|
33
|
-
return false
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
Component.register('bpmn-flow', BPMNFlow)
|
package/src/bpmn-gateway.ts
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { BOUNDS, Component, ComponentNature, Properties } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNControlBase from './base/bpmn-control-base'
|
|
4
|
-
|
|
5
|
-
const NATURE: ComponentNature = {
|
|
6
|
-
mutable: false,
|
|
7
|
-
resizable: true,
|
|
8
|
-
rotatable: false,
|
|
9
|
-
properties: [
|
|
10
|
-
{
|
|
11
|
-
type: 'select',
|
|
12
|
-
label: 'gateway-type',
|
|
13
|
-
name: 'gatewayType',
|
|
14
|
-
property: {
|
|
15
|
-
options: [
|
|
16
|
-
{
|
|
17
|
-
display: '',
|
|
18
|
-
value: ''
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
display: 'exclusive',
|
|
22
|
-
value: 'exclusive'
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
display: 'inclusive',
|
|
26
|
-
value: 'inclusive'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
display: 'complex',
|
|
30
|
-
value: 'complex'
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
display: 'event based',
|
|
34
|
-
value: 'event-based'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
display: 'parallel',
|
|
38
|
-
value: 'parallel'
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
help: '/bpmn/gateway/gateway'
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default class BPMNGateway extends BPMNControlBase {
|
|
48
|
-
private imageElement?: HTMLImageElement
|
|
49
|
-
|
|
50
|
-
static get nature() {
|
|
51
|
-
return NATURE
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
get textBounds(): BOUNDS {
|
|
55
|
-
var { left, top, width, height } = this.bounds
|
|
56
|
-
var { paddingTop, paddingLeft, paddingRight } = this.state
|
|
57
|
-
|
|
58
|
-
paddingTop ||= 0
|
|
59
|
-
paddingLeft ||= 0
|
|
60
|
-
paddingRight ||= 0
|
|
61
|
-
|
|
62
|
-
return {
|
|
63
|
-
left: left + paddingLeft,
|
|
64
|
-
top: top + paddingTop + height + 10,
|
|
65
|
-
width: Math.max(width - paddingLeft - paddingRight, 0),
|
|
66
|
-
height: 0
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
render(ctx: CanvasRenderingContext2D) {
|
|
71
|
-
var { left, top, width, height } = this.bounds
|
|
72
|
-
|
|
73
|
-
ctx.translate(left, top)
|
|
74
|
-
ctx.beginPath()
|
|
75
|
-
|
|
76
|
-
ctx.moveTo(width / 2, 0)
|
|
77
|
-
ctx.lineTo(width, height / 2)
|
|
78
|
-
ctx.lineTo(width / 2, height)
|
|
79
|
-
ctx.lineTo(0, height / 2)
|
|
80
|
-
ctx.lineTo(width / 2, 0)
|
|
81
|
-
|
|
82
|
-
ctx.translate(-left, -top)
|
|
83
|
-
|
|
84
|
-
this.drawFill(ctx)
|
|
85
|
-
this.drawStroke(ctx)
|
|
86
|
-
|
|
87
|
-
ctx.beginPath()
|
|
88
|
-
|
|
89
|
-
const image = this.getImageElement()
|
|
90
|
-
if (image) {
|
|
91
|
-
this.drawImage(ctx, image, left + width / 6, top + height / 6, (width * 2) / 3, (height * 2) / 3)
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
onchange(after: Properties, before: Properties) {
|
|
96
|
-
if ('gatewayType' in after || 'strokeStyle' in after) {
|
|
97
|
-
delete this.imageElement
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
getImageElement(): HTMLImageElement | undefined {
|
|
102
|
-
if (!this.imageElement) {
|
|
103
|
-
const { gatewayType, strokeStyle } = this.state
|
|
104
|
-
|
|
105
|
-
if (!gatewayType) {
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const src = IMAGES[gatewayType]
|
|
110
|
-
if (!src) {
|
|
111
|
-
return
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
this.imageElement = new Image()
|
|
115
|
-
this.imageElement.src =
|
|
116
|
-
'data:image/svg+xml;charset=UTF-8;base64,' + btoa(src.replace(/{{strokeColor}}/g, strokeStyle))
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return this.imageElement
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
Component.register('bpmn-gateway', BPMNGateway)
|
|
124
|
-
|
|
125
|
-
const IMAGES: { [type: string]: string } = {
|
|
126
|
-
inclusive: `
|
|
127
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
128
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
129
|
-
<style type="text/css">
|
|
130
|
-
.st0{fill:{{strokeColor}};}
|
|
131
|
-
</style>
|
|
132
|
-
<path class="st0" d="M17.5,8.5c5,0,9,4,9,9s-4,9-9,9s-9-4-9-9S12.5,8.5,17.5,8.5 M17.5,6C11.1,6,6,11.1,6,17.5S11.1,29,17.5,29S29,23.9,29,17.5
|
|
133
|
-
S23.9,6,17.5,6L17.5,6z"/>
|
|
134
|
-
</svg>
|
|
135
|
-
`,
|
|
136
|
-
exclusive: `
|
|
137
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
138
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
139
|
-
<style type="text/css">
|
|
140
|
-
.st0{fill:{{strokeColor}};}
|
|
141
|
-
</style>
|
|
142
|
-
<rect class="st0" x="6.5" y="15.8" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.2487 17.5)" width="22" height="3.5"/>
|
|
143
|
-
<rect class="st0" x="15.8" y="6.5" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.2487 17.5)" width="3.5" height="22"/>
|
|
144
|
-
</svg>
|
|
145
|
-
`,
|
|
146
|
-
parallel: `
|
|
147
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
148
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
149
|
-
<style type="text/css">
|
|
150
|
-
.st0{fill:{{strokeColor}};}
|
|
151
|
-
</style>
|
|
152
|
-
<rect class="st0" x="16.3" y="6.5" width="3.5" height="22"/>
|
|
153
|
-
<rect class="st0" x="6.5" y="16.2" width="22" height="3.5"/>
|
|
154
|
-
</svg>
|
|
155
|
-
`,
|
|
156
|
-
complex: `
|
|
157
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
158
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
159
|
-
<style type="text/css">
|
|
160
|
-
.st0{fill:{{strokeColor}};}
|
|
161
|
-
</style>
|
|
162
|
-
<rect class="st0" x="16.2" y="6.5" width="3.5" height="22"/>
|
|
163
|
-
<rect class="st0" x="6.5" y="16.2" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.2487 17.5)" width="22" height="3.5"/>
|
|
164
|
-
<rect class="st0" x="16.2" y="6.5" transform="matrix(0.7072 -0.707 0.707 0.7072 -7.2487 17.4966)" width="3.5" height="22"/>
|
|
165
|
-
<rect class="st0" x="6.5" y="16.2" width="22" height="3.5"/>
|
|
166
|
-
</svg>
|
|
167
|
-
`,
|
|
168
|
-
'event-based': `
|
|
169
|
-
<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
170
|
-
viewBox="0 0 35 35" style="enable-background:new 0 0 35 35;" xml:space="preserve">
|
|
171
|
-
<style type="text/css">
|
|
172
|
-
.st0{fill:{{strokeColor}};}
|
|
173
|
-
</style>
|
|
174
|
-
<path class="st0" d="M17.5,6.2c6.2,0,11.2,5,11.2,11.2s-5,11.2-11.2,11.2s-11.2-5-11.2-11.2S11.3,6.2,17.5,6.2 M17.5,5.5c-6.6,0-12,5.4-12,12
|
|
175
|
-
s5.4,12,12,12s12-5.4,12-12S24.1,5.5,17.5,5.5L17.5,5.5z"/>
|
|
176
|
-
<path class="st0" d="M17.5,8.2c5.1,0,9.2,4.1,9.2,9.2s-4.1,9.2-9.2,9.2s-9.2-4.1-9.2-9.2S12.4,8.2,17.5,8.2 M17.5,7.5c-5.5,0-10,4.5-10,10
|
|
177
|
-
s4.5,10,10,10s10-4.5,10-10S23,7.5,17.5,7.5L17.5,7.5z"/>
|
|
178
|
-
<path class="st0" d="M17.5,11.7l5.7,4.1L21,22.5h-7l-2.2-6.7L17.5,11.7 M17.5,10l-7.3,5.3l2.8,8.6h9l2.8-8.6L17.5,10L17.5,10z"/>
|
|
179
|
-
</svg>
|
|
180
|
-
`
|
|
181
|
-
}
|
package/src/bpmn-group.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNContainerBase from './base/bpmn-container-base'
|
|
4
|
-
|
|
5
|
-
const NATURE: ComponentNature = {
|
|
6
|
-
mutable: false,
|
|
7
|
-
resizable: true,
|
|
8
|
-
rotatable: false,
|
|
9
|
-
properties: [],
|
|
10
|
-
help: '/bpmn/group/group'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default class BPMNGroup extends BPMNContainerBase {
|
|
14
|
-
static get nature() {
|
|
15
|
-
return NATURE
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
render(ctx: CanvasRenderingContext2D) {
|
|
19
|
-
var { left, top, width, height } = this.bounds
|
|
20
|
-
|
|
21
|
-
ctx.translate(left, top)
|
|
22
|
-
ctx.beginPath()
|
|
23
|
-
|
|
24
|
-
var radius = 9
|
|
25
|
-
|
|
26
|
-
ctx.moveTo(radius, 0)
|
|
27
|
-
ctx.arcTo(width, 0, width, height, radius)
|
|
28
|
-
ctx.arcTo(width, height, 0, height, radius)
|
|
29
|
-
ctx.arcTo(0, height, 0, 0, radius)
|
|
30
|
-
ctx.arcTo(0, 0, width, 0, radius)
|
|
31
|
-
|
|
32
|
-
ctx.translate(-left, -top)
|
|
33
|
-
|
|
34
|
-
this.drawFill(ctx)
|
|
35
|
-
this.drawStroke(ctx)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
Component.register('bpmn-group', BPMNGroup)
|
package/src/bpmn-lane.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature, Properties } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNContainerBase from './base/bpmn-container-base'
|
|
4
|
-
|
|
5
|
-
const NATURE: ComponentNature = {
|
|
6
|
-
mutable: false,
|
|
7
|
-
resizable: true,
|
|
8
|
-
rotatable: false,
|
|
9
|
-
properties: [
|
|
10
|
-
{
|
|
11
|
-
type: 'string',
|
|
12
|
-
name: 'name',
|
|
13
|
-
label: 'name'
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
help: '/bpmn/lane/lane'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default class BPMNLane extends BPMNContainerBase {
|
|
20
|
-
private textElement?: HTMLSpanElement
|
|
21
|
-
|
|
22
|
-
get nature() {
|
|
23
|
-
return NATURE
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get hasTextProperty() {
|
|
27
|
-
return true
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
createElement() {
|
|
31
|
-
super.createElement()
|
|
32
|
-
|
|
33
|
-
const text = document.createElement('div')
|
|
34
|
-
|
|
35
|
-
this.element.appendChild(text)
|
|
36
|
-
this.textElement = text
|
|
37
|
-
this.setTextElementProperties()
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
setTextElementProperties() {
|
|
41
|
-
if (!this.textElement) {
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var {
|
|
46
|
-
bold,
|
|
47
|
-
italic,
|
|
48
|
-
|
|
49
|
-
fontFamily = '',
|
|
50
|
-
textAlign,
|
|
51
|
-
textBaseline,
|
|
52
|
-
|
|
53
|
-
paddingTop,
|
|
54
|
-
paddingBottom,
|
|
55
|
-
paddingLeft,
|
|
56
|
-
paddingRight,
|
|
57
|
-
|
|
58
|
-
fontSize = 20,
|
|
59
|
-
fontColor,
|
|
60
|
-
lineHeight = 1,
|
|
61
|
-
textWrap = true,
|
|
62
|
-
name
|
|
63
|
-
} = this.state
|
|
64
|
-
|
|
65
|
-
paddingBottom ||= 0
|
|
66
|
-
paddingTop ||= 0
|
|
67
|
-
paddingLeft ||= 0
|
|
68
|
-
paddingRight ||= 0
|
|
69
|
-
|
|
70
|
-
var { width, height } = this.bounds
|
|
71
|
-
const vertical = height > width
|
|
72
|
-
|
|
73
|
-
// element의 기본 style을 설정한다.
|
|
74
|
-
|
|
75
|
-
if (vertical) {
|
|
76
|
-
Object.assign(this.textElement!.style, {
|
|
77
|
-
transform: 'none',
|
|
78
|
-
position: 'relative',
|
|
79
|
-
width: `${width - paddingLeft - paddingRight}px`,
|
|
80
|
-
boxSizing: 'content-box',
|
|
81
|
-
fontFamily: fontFamily,
|
|
82
|
-
fontSize: fontSize + 'px',
|
|
83
|
-
paddingTop: paddingTop + 'px',
|
|
84
|
-
paddingRight: paddingRight + 'px',
|
|
85
|
-
paddingBottom: paddingBottom + 'px',
|
|
86
|
-
paddingLeft: paddingLeft + 'px',
|
|
87
|
-
color: fontColor,
|
|
88
|
-
fontWeight: bold ? 'bold' : '',
|
|
89
|
-
fontStyle: italic ? 'italic' : '',
|
|
90
|
-
textAlign: textAlign == 'end' ? 'right' : textAlign == 'start' ? 'left' : textAlign,
|
|
91
|
-
verticalAlign: textBaseline,
|
|
92
|
-
lineHeight,
|
|
93
|
-
whiteSpace: textWrap === true ? 'normal' : 'nowrap'
|
|
94
|
-
})
|
|
95
|
-
} else {
|
|
96
|
-
Object.assign(this.textElement!.style, {
|
|
97
|
-
transform: `translate(-50%, -50%) translate(0, ${height / 2}px) rotate(270deg) translate(0, 50%)`,
|
|
98
|
-
position: 'relative',
|
|
99
|
-
width: `${height - paddingTop - paddingBottom}px`,
|
|
100
|
-
boxSizing: 'content-box',
|
|
101
|
-
fontFamily: fontFamily,
|
|
102
|
-
fontSize: fontSize + 'px',
|
|
103
|
-
paddingTop: paddingLeft + 'px',
|
|
104
|
-
paddingRight: paddingTop + 'px',
|
|
105
|
-
paddingBottom: paddingRight + 'px',
|
|
106
|
-
paddingLeft: paddingBottom + 'px',
|
|
107
|
-
color: fontColor,
|
|
108
|
-
fontWeight: bold ? 'bold' : '',
|
|
109
|
-
fontStyle: italic ? 'italic' : '',
|
|
110
|
-
textAlign: textAlign == 'end' ? 'right' : textAlign == 'start' ? 'left' : textAlign,
|
|
111
|
-
verticalAlign: textBaseline,
|
|
112
|
-
lineHeight,
|
|
113
|
-
whiteSpace: textWrap === true ? 'normal' : 'nowrap'
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
this.textElement!.textContent = name
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
onchange(after: Properties, before: Properties) {
|
|
121
|
-
this.setTextElementProperties()
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
Component.register('bpmn-lane', BPMNLane)
|
package/src/bpmn-message.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { BOUNDS, Component, ComponentNature } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNControlBase from './base/bpmn-control-base'
|
|
4
|
-
|
|
5
|
-
const NATURE: ComponentNature = {
|
|
6
|
-
mutable: false,
|
|
7
|
-
resizable: true,
|
|
8
|
-
rotatable: false,
|
|
9
|
-
properties: [],
|
|
10
|
-
help: '/bpmn/message/message'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default class BPMNMessage extends BPMNControlBase {
|
|
14
|
-
static get nature() {
|
|
15
|
-
return NATURE
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
get textBounds(): BOUNDS {
|
|
19
|
-
var { left, top, width, height } = this.bounds
|
|
20
|
-
var { paddingTop, paddingLeft, paddingRight } = this.state
|
|
21
|
-
|
|
22
|
-
paddingTop ||= 0
|
|
23
|
-
paddingLeft ||= 0
|
|
24
|
-
paddingRight ||= 0
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
left: left + paddingLeft,
|
|
28
|
-
top: top + paddingTop + height + 10,
|
|
29
|
-
width: Math.max(width - paddingLeft - paddingRight, 0),
|
|
30
|
-
height: 0
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
render(ctx: CanvasRenderingContext2D) {
|
|
35
|
-
var { left, top, width, height } = this.bounds
|
|
36
|
-
|
|
37
|
-
const corner = (Math.min(width, height) * 2) / 5
|
|
38
|
-
|
|
39
|
-
ctx.translate(left, top)
|
|
40
|
-
ctx.beginPath()
|
|
41
|
-
|
|
42
|
-
ctx.moveTo(0, 0)
|
|
43
|
-
ctx.lineTo(width, 0)
|
|
44
|
-
ctx.lineTo(width, height)
|
|
45
|
-
ctx.lineTo(0, height)
|
|
46
|
-
ctx.lineTo(0, 0)
|
|
47
|
-
ctx.lineTo(width / 2, height / 2)
|
|
48
|
-
ctx.lineTo(width, 0)
|
|
49
|
-
|
|
50
|
-
ctx.translate(-left, -top)
|
|
51
|
-
|
|
52
|
-
this.drawFill(ctx)
|
|
53
|
-
this.drawStroke(ctx)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
Component.register('bpmn-message', BPMNMessage)
|
package/src/bpmn-pool.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentNature } from '@hatiolab/things-scene'
|
|
2
|
-
|
|
3
|
-
import BPMNContainerBase, { DIRECTION, INOUT, NODE, FLOW } from './base/bpmn-container-base'
|
|
4
|
-
|
|
5
|
-
const NATURE: ComponentNature = {
|
|
6
|
-
mutable: false,
|
|
7
|
-
resizable: true,
|
|
8
|
-
rotatable: false,
|
|
9
|
-
properties: [
|
|
10
|
-
{
|
|
11
|
-
type: 'string',
|
|
12
|
-
name: 'name',
|
|
13
|
-
label: 'name'
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
help: '/bpmn/pool/pool'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default class BPMNPool extends BPMNContainerBase {
|
|
20
|
-
get nature() {
|
|
21
|
-
return NATURE
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
Component.register('bpmn-pool', BPMNPool)
|