sequential-workflow-designer 0.18.0 → 0.18.2
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/README.md +4 -4
- package/dist/index.umd.js +9 -1
- package/lib/cjs/index.cjs +9 -1
- package/lib/esm/index.js +9 -1
- package/lib/index.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,10 +96,10 @@ Add the below code to your head section in HTML document.
|
|
|
96
96
|
```html
|
|
97
97
|
<head>
|
|
98
98
|
...
|
|
99
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.
|
|
100
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.
|
|
101
|
-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.
|
|
102
|
-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.
|
|
99
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.2/css/designer.css" rel="stylesheet">
|
|
100
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.2/css/designer-light.css" rel="stylesheet">
|
|
101
|
+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.2/css/designer-dark.css" rel="stylesheet">
|
|
102
|
+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.2/dist/index.umd.js"></script>
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Call the designer by:
|
package/dist/index.umd.js
CHANGED
|
@@ -655,7 +655,9 @@
|
|
|
655
655
|
}
|
|
656
656
|
moveViewportToStep(stepId) {
|
|
657
657
|
const component = this.workspaceController.getComponentByStepId(stepId);
|
|
658
|
-
const
|
|
658
|
+
const canvasPosition = this.workspaceController.getCanvasPosition();
|
|
659
|
+
const clientPosition = component.view.getClientPosition();
|
|
660
|
+
const componentPosition = clientPosition.subtract(canvasPosition);
|
|
659
661
|
const componentSize = new Vector(component.view.width, component.view.height);
|
|
660
662
|
this.viewportController.focusOnComponent(componentPosition, componentSize);
|
|
661
663
|
}
|
|
@@ -4516,6 +4518,12 @@
|
|
|
4516
4518
|
getStepParents(needle) {
|
|
4517
4519
|
return this.walker.getParents(this.state.definition, needle);
|
|
4518
4520
|
}
|
|
4521
|
+
/**
|
|
4522
|
+
* @returns the definition walker.
|
|
4523
|
+
*/
|
|
4524
|
+
getWalker() {
|
|
4525
|
+
return this.walker;
|
|
4526
|
+
}
|
|
4519
4527
|
/**
|
|
4520
4528
|
* @description Destroys the designer and deletes all nodes from the placeholder.
|
|
4521
4529
|
*/
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -653,7 +653,9 @@ class ViewportApi {
|
|
|
653
653
|
}
|
|
654
654
|
moveViewportToStep(stepId) {
|
|
655
655
|
const component = this.workspaceController.getComponentByStepId(stepId);
|
|
656
|
-
const
|
|
656
|
+
const canvasPosition = this.workspaceController.getCanvasPosition();
|
|
657
|
+
const clientPosition = component.view.getClientPosition();
|
|
658
|
+
const componentPosition = clientPosition.subtract(canvasPosition);
|
|
657
659
|
const componentSize = new Vector(component.view.width, component.view.height);
|
|
658
660
|
this.viewportController.focusOnComponent(componentPosition, componentSize);
|
|
659
661
|
}
|
|
@@ -4331,6 +4333,12 @@ class Designer {
|
|
|
4331
4333
|
getStepParents(needle) {
|
|
4332
4334
|
return this.walker.getParents(this.state.definition, needle);
|
|
4333
4335
|
}
|
|
4336
|
+
/**
|
|
4337
|
+
* @returns the definition walker.
|
|
4338
|
+
*/
|
|
4339
|
+
getWalker() {
|
|
4340
|
+
return this.walker;
|
|
4341
|
+
}
|
|
4334
4342
|
/**
|
|
4335
4343
|
* @description Destroys the designer and deletes all nodes from the placeholder.
|
|
4336
4344
|
*/
|
package/lib/esm/index.js
CHANGED
|
@@ -652,7 +652,9 @@ class ViewportApi {
|
|
|
652
652
|
}
|
|
653
653
|
moveViewportToStep(stepId) {
|
|
654
654
|
const component = this.workspaceController.getComponentByStepId(stepId);
|
|
655
|
-
const
|
|
655
|
+
const canvasPosition = this.workspaceController.getCanvasPosition();
|
|
656
|
+
const clientPosition = component.view.getClientPosition();
|
|
657
|
+
const componentPosition = clientPosition.subtract(canvasPosition);
|
|
656
658
|
const componentSize = new Vector(component.view.width, component.view.height);
|
|
657
659
|
this.viewportController.focusOnComponent(componentPosition, componentSize);
|
|
658
660
|
}
|
|
@@ -4330,6 +4332,12 @@ class Designer {
|
|
|
4330
4332
|
getStepParents(needle) {
|
|
4331
4333
|
return this.walker.getParents(this.state.definition, needle);
|
|
4332
4334
|
}
|
|
4335
|
+
/**
|
|
4336
|
+
* @returns the definition walker.
|
|
4337
|
+
*/
|
|
4338
|
+
getWalker() {
|
|
4339
|
+
return this.walker;
|
|
4340
|
+
}
|
|
4333
4341
|
/**
|
|
4334
4342
|
* @description Destroys the designer and deletes all nodes from the placeholder.
|
|
4335
4343
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -1145,6 +1145,10 @@ declare class Designer<TDefinition extends Definition = Definition> {
|
|
|
1145
1145
|
* @returns parent steps and branch names.
|
|
1146
1146
|
*/
|
|
1147
1147
|
getStepParents(needle: Sequence | Step | string): StepOrName[];
|
|
1148
|
+
/**
|
|
1149
|
+
* @returns the definition walker.
|
|
1150
|
+
*/
|
|
1151
|
+
getWalker(): DefinitionWalker;
|
|
1148
1152
|
/**
|
|
1149
1153
|
* @description Destroys the designer and deletes all nodes from the placeholder.
|
|
1150
1154
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sequential-workflow-designer",
|
|
3
3
|
"description": "Customizable no-code component for building flow-based programming applications.",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|