Skip to content

Commit 41549b6

Browse files
authored
0.18.0 (#106)
1 parent b1b2846 commit 41549b6

File tree

20 files changed

+89
-43
lines changed

20 files changed

+89
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.18.0
2+
3+
This version fixes the problem with scrolling [#105](https://github.com/nocode-js/sequential-workflow-designer/issues/105).
4+
15
## 0.17.0
26

37
This version introduces a new argument for editor providers: `isReadonly`. Now when the designer is in the read-only mode, the editor providers can render the read-only version of the editor.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ Add the below code to your head section in HTML document.
9696
```html
9797
<head>
9898
...
99-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.17.0/css/designer.css" rel="stylesheet">
100-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.17.0/css/designer-light.css" rel="stylesheet">
101-
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.17.0/css/designer-dark.css" rel="stylesheet">
102-
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.17.0/dist/index.umd.js"></script>
99+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.0/css/designer.css" rel="stylesheet">
100+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.0/css/designer-light.css" rel="stylesheet">
101+
<link href="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.0/css/designer-dark.css" rel="stylesheet">
102+
<script src="https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.18.0/dist/index.umd.js"></script>
103103
```
104104

105105
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.17.0",
4+
"version": "0.18.0",
55
"author": {
66
"name": "NoCode JS",
77
"url": "https://nocode-js.com/"
@@ -15,7 +15,7 @@
1515
"peerDependencies": {
1616
"@angular/common": "12 - 16",
1717
"@angular/core": "12 - 16",
18-
"sequential-workflow-designer": "^0.17.0"
18+
"sequential-workflow-designer": "^0.18.0"
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": "^15.2.9",
2727
"@angular/router": "^15.2.9",
2828
"rxjs": "~7.8.0",
29-
"sequential-workflow-designer": "^0.17.0",
30-
"sequential-workflow-designer-angular": "^0.17.0",
29+
"sequential-workflow-designer": "^0.18.0",
30+
"sequential-workflow-designer-angular": "^0.18.0",
3131
"tslib": "^2.3.0",
3232
"zone.js": "~0.13.0"
3333
},

demos/angular-app/yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5956,17 +5956,17 @@ send@0.18.0:
59565956
range-parser "~1.2.1"
59575957
statuses "2.0.1"
59585958

5959-
sequential-workflow-designer-angular@^0.17.0:
5960-
version "0.17.0"
5961-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.17.0.tgz#c16fc5d629180af3f9d609fc654bf2b08ced59bc"
5962-
integrity sha512-Qhs0LQRHwiLp9K4pETnVhmeeaGqe7Kv055ix7arqFi8HYYkNHga/7IWIJLVpjpk2AomM8DIpf4t2r6NrSr4jnQ==
5959+
sequential-workflow-designer-angular@^0.18.0:
5960+
version "0.18.0"
5961+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.18.0.tgz#2646e33cb50c5854cf29dd92c2838f03449c28ee"
5962+
integrity sha512-gYxRxNP1Y8d+m9C0TmkQ0F9jcDrb1hsZVxQmLtTaJcTYTigxz0Hr0ATzhbZTbxVX1A2Gwr0apXj3oO7hpUMXhw==
59635963
dependencies:
59645964
tslib "^2.3.0"
59655965

5966-
sequential-workflow-designer@^0.17.0:
5967-
version "0.17.0"
5968-
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.17.0.tgz#fb126b4a45fef107ac54b041e116ddaca607e48f"
5969-
integrity sha512-RzKn99irxTqsLn84RkMp7Q6XnvVjufG3xTKUy89uSC9a4CgG0k70jL36zLXxpW7cGEjjzGK/LgIeQ9/kiUOInQ==
5966+
sequential-workflow-designer@^0.18.0:
5967+
version "0.18.0"
5968+
resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.18.0.tgz#20833b793103096be31009fca20891d59433020a"
5969+
integrity sha512-B/jdes+Vxkjec+GRSMePQ9AtssJ1Da1yaHT1XKK1wkKbBpmBUXqYEel0C1NBVhp+JliKMMyN2rACiUlbXBHpVA==
59705970
dependencies:
59715971
sequential-workflow-model "^0.2.0"
59725972

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.17.0",
10-
"sequential-workflow-designer-react": "^0.17.0"
9+
"sequential-workflow-designer": "^0.18.0",
10+
"sequential-workflow-designer-react": "^0.18.0"
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.17.0",
20-
"sequential-workflow-designer-svelte": "^0.17.0"
19+
"sequential-workflow-designer": "^0.18.0",
20+
"sequential-workflow-designer-svelte": "^0.18.0"
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.17.0",
4+
"version": "0.18.0",
55
"type": "module",
66
"main": "./lib/esm/index.js",
77
"types": "./lib/index.d.ts",

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ export class DragStepBehavior implements Behavior {
4949
this.draggedStepComponent.view.width === this.view.component.width &&
5050
this.draggedStepComponent.view.height === this.view.component.height;
5151
if (hasSameSize) {
52-
const scroll = new Vector(window.scrollX, window.scrollY);
5352
// Mouse cursor will be positioned on the same place as the source component.
54-
const pagePosition = this.draggedStepComponent.view.getClientPosition().add(scroll);
53+
const pagePosition = this.draggedStepComponent.view.getClientPosition();
5554
offset = position.subtract(pagePosition);
5655
}
5756
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { getAbsolutePosition } from './get-absolute-position';
2+
3+
describe('getAbsolutePosition', () => {
4+
it('returns correct position', () => {
5+
const el = document.createElement('div');
6+
el.style.position = 'absolute';
7+
el.style.left = '10px';
8+
el.style.top = '20px';
9+
10+
document.body.appendChild(el);
11+
12+
const position = getAbsolutePosition(el);
13+
14+
expect(position.x).toBe(10);
15+
expect(position.y).toBe(20);
16+
17+
document.body.removeChild(el);
18+
});
19+
});

0 commit comments

Comments
 (0)