Skip to content

Commit 617099d

Browse files
authored
0.35.1. (#208)
1 parent 63262a9 commit 617099d

File tree

13 files changed

+41
-32
lines changed

13 files changed

+41
-32
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.35.1
2+
3+
This version fixes a bug in the calculation of the placeholder position when dragging a step component.
4+
15
# 0.35.0
26

37
This version changes the behavior of the drag step component. The dragged component is now scaled according to the current zoom level of the designer [#206](https://github.com/nocode-js/sequential-workflow-designer/issues/206).

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ Add the below code to your head section in HTML document.
106106
```html
107107
<head>
108108
...
109-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.0/css/designer.css" rel="stylesheet">
110-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.0/css/designer-light.css" rel="stylesheet">
111-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.0/css/designer-dark.css" rel="stylesheet">
112-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.0/dist/index.umd.js"></script>
109+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.1/css/designer.css" rel="stylesheet">
110+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.1/css/designer-light.css" rel="stylesheet">
111+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.1/css/designer-dark.css" rel="stylesheet">
112+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.35.1/dist/index.umd.js"></script>
113113
```
114114

115115
Call the designer by:

angular/designer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sequential-workflow-designer-angular",
33
"description": "Angular wrapper for Sequential Workflow Designer component.",
4-
"version": "0.35.0",
4+
"version": "0.35.1",
55
"author": {
66
"name": "NoCode JS",
77
"url": "https://nocode-js.com/"
@@ -15,7 +15,7 @@
1515
"peerDependencies": {
1616
"@angular/common": "12 - 19",
1717
"@angular/core": "12 - 19",
18-
"sequential-workflow-designer": "^0.35.0"
18+
"sequential-workflow-designer": "^0.35.1"
1919
},
2020
"dependencies": {
2121
"tslib": "^2.3.0"

demos/angular-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"@angular/platform-browser-dynamic": "^17.3.9",
2727
"@angular/router": "^17.3.9",
2828
"rxjs": "~7.8.0",
29-
"sequential-workflow-designer": "^0.35.0",
30-
"sequential-workflow-designer-angular": "^0.35.0",
29+
"sequential-workflow-designer": "^0.35.1",
30+
"sequential-workflow-designer-angular": "^0.35.1",
3131
"tslib": "^2.3.0",
3232
"zone.js": "~0.14.6"
3333
},

demos/angular-app/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6744,17 +6744,17 @@ send@0.18.0:
67446744
range-parser "~1.2.1"
67456745
statuses "2.0.1"
67466746

6747-
sequential-workflow-designer-angular@^0.35.0:
6748-
version "0.35.0"
6749-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.35.0.tgz#52e266a88161f0d11d82ec6e97faf6804d2fcd82"
6750-
integrity sha512-tDj4Ccmga4j1Ujb7DVyZ6YLxa2VLylyHLbPb9erktdfL2ipR02FT6IbRZN9BR7ROpOqMjxSCMbWug3B3wjGzMg==
6747+
sequential-workflow-designer-angular@^0.35.1:
6748+
version "0.35.1"
6749+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.35.1.tgz#2d29e3da2d098d6a59aa3b1625feba8d597fdd1c"
6750+
integrity sha512-anB5bS+KMvjJROO7Srcfn0wECDFXt/VL414UG7BzduIGzcN8dXSxLotUc1eTHyq6JXr3xoBuhDO0QoTluW+3Hg==
67516751
dependencies:
67526752
tslib "^2.3.0"
67536753

6754-
sequential-workflow-designer@^0.35.0:
6755-
version "0.35.0"
6756-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.35.0.tgz#1849d3c5134338138cee7dadb2e5e5c772fe7c74"
6757-
integrity sha512-AEHfvWhZL/DekiW5nO1f2IA9RWu8X6Rn6g7TLFG1yttvzKPMO3HGFUc7jpHOsCxYX8XLzJ7YO0Q33n8rHhUj5A==
6754+
sequential-workflow-designer@^0.35.1:
6755+
version "0.35.1"
6756+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.35.1.tgz#b62386eff4b1ce88110ab6cd13ef0b45aba9de25"
6757+
integrity sha512-BwnxWkHyMCSn5kCheWE6mdfLD53gaNp4Goz9T7ma5IqqS5YSNen3MDQbgo2hH4DJNMnPEz0S4Cx0nQ0oKsuXzw==
67586758
dependencies:
67596759
sequential-workflow-model "^0.2.0"
67606760

demos/react-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"dependencies": {
77
"react": "^18.2.0",
88
"react-dom": "^18.2.0",
9-
"sequential-workflow-designer": "^0.35.0",
10-
"sequential-workflow-designer-react": "^0.35.0"
9+
"sequential-workflow-designer": "^0.35.1",
10+
"sequential-workflow-designer-react": "^0.35.1"
1111
},
1212
"devDependencies": {
1313
"@types/jest": "^29.2.5",

demos/svelte-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"eslint": "eslint ./src --ext .ts"
1717
},
1818
"dependencies": {
19-
"sequential-workflow-designer": "^0.35.0",
20-
"sequential-workflow-designer-svelte": "^0.35.0"
19+
"sequential-workflow-designer": "^0.35.1",
20+
"sequential-workflow-designer-svelte": "^0.35.1"
2121
},
2222
"devDependencies": {
2323
"@sveltejs/adapter-static": "^2.0.3",

designer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sequential-workflow-designer",
33
"description": "Customizable no-code component for building flow-based programming applications.",
4-
"version": "0.35.0",
4+
"version": "0.35.1",
55
"type": "module",
66
"main": "./lib/esm/index.js",
77
"types": "./lib/index.d.ts",

designer/src/behaviors/drag-step-behavior.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ export class DragStepBehavior implements Behavior {
8686
const newPosition = this.state.startPosition.subtract(delta).subtract(this.state.offset);
8787
this.view.setPosition(newPosition);
8888

89-
const placeholder = this.state.finder.find(newPosition, this.view.component.width, this.view.component.height);
89+
const placeholder = this.state.finder.find(
90+
newPosition,
91+
this.view.component.width,
92+
this.view.component.height,
93+
this.view.component.scale
94+
);
9095

9196
if (this.currentPlaceholder !== placeholder) {
9297
if (this.currentPlaceholder) {

designer/src/behaviors/placeholder-finder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class PlaceholderFinder {
2222
private readonly state: DesignerState
2323
) {}
2424

25-
public find(vLt: Vector, vWidth: number, vHeight: number): Placeholder | undefined {
25+
public find(vLt: Vector, vWidth: number, vHeight: number, vScale: number): Placeholder | undefined {
2626
if (!this.cache) {
2727
const scroll = new Vector(window.scrollX, window.scrollY);
2828

@@ -39,8 +39,8 @@ export class PlaceholderFinder {
3939
});
4040
this.cache.sort((a, b) => a.diagSq - b.diagSq);
4141
}
42-
const vR = vLt.x + vWidth;
43-
const vB = vLt.y + vHeight;
42+
const vR = vLt.x + vWidth * vScale;
43+
const vB = vLt.y + vHeight * vScale;
4444
return this.cache.find(p => {
4545
return Math.max(vLt.x, p.lt.x) < Math.min(vR, p.br.x) && Math.max(vLt.y, p.lt.y) < Math.min(vB, p.br.y);
4646
})?.placeholder;

0 commit comments

Comments
 (0)