diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d01d06..28b72e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.19.3 + +This version improves the experience of scrolling in the toolbox via the touchpad. + ## 0.19.2 This version adds the `alt` key support. Now when you hold the `alt` key and click on the canvas, the drag and drop is disabled [#126](https://github.com/nocode-js/sequential-workflow-designer/issues/126). diff --git a/README.md b/README.md index 2b7ab71..22f50d7 100644 --- a/README.md +++ b/README.md @@ -100,10 +100,10 @@ Add the below code to your head section in HTML document. ```html
... - - - - + + + + ``` Call the designer by: diff --git a/angular/designer/package.json b/angular/designer/package.json index f0d9c1c..d44cb77 100644 --- a/angular/designer/package.json +++ b/angular/designer/package.json @@ -1,7 +1,7 @@ { "name": "sequential-workflow-designer-angular", "description": "Angular wrapper for Sequential Workflow Designer component.", - "version": "0.19.2", + "version": "0.19.3", "author": { "name": "NoCode JS", "url": "https://nocode-js.com/" @@ -15,7 +15,7 @@ "peerDependencies": { "@angular/common": "12 - 16", "@angular/core": "12 - 16", - "sequential-workflow-designer": "^0.19.2" + "sequential-workflow-designer": "^0.19.3" }, "dependencies": { "tslib": "^2.3.0" diff --git a/demos/angular-app/package.json b/demos/angular-app/package.json index b846ba9..683aef4 100644 --- a/demos/angular-app/package.json +++ b/demos/angular-app/package.json @@ -26,8 +26,8 @@ "@angular/platform-browser-dynamic": "^15.2.9", "@angular/router": "^15.2.9", "rxjs": "~7.8.0", - "sequential-workflow-designer": "^0.19.2", - "sequential-workflow-designer-angular": "^0.19.2", + "sequential-workflow-designer": "^0.19.3", + "sequential-workflow-designer-angular": "^0.19.3", "tslib": "^2.3.0", "zone.js": "~0.13.0" }, diff --git a/demos/angular-app/yarn.lock b/demos/angular-app/yarn.lock index aa794ef..cdbd9c5 100644 --- a/demos/angular-app/yarn.lock +++ b/demos/angular-app/yarn.lock @@ -5956,17 +5956,17 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -sequential-workflow-designer-angular@^0.19.2: - version "0.19.2" - resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.19.2.tgz#367e51b985c27ea58bf2f824dbc5b94a130f55b2" - integrity sha512-hSZlLyBSRXOtsEZIwh92NODta8GznS8vBUHh7vgv4+33WCyip+wL8cDB/QqtFYDs/fSvCsxYsNUEgjlOrkLYCw== +sequential-workflow-designer-angular@^0.19.3: + version "0.19.3" + resolved "https://registry.yarnpkg.com/sequential-workflow-designer-angular/-/sequential-workflow-designer-angular-0.19.3.tgz#5b69f09f5d600034202ec04c42f473eb2be34841" + integrity sha512-H7J+Vr923SeNvnG8Uxup3Hu+lSjNodMZEILoum+uVTZP3xUZyETd4bprd5MdEE6/wlUai8cLOk69+QojQAuqUQ== dependencies: tslib "^2.3.0" -sequential-workflow-designer@^0.19.2: - version "0.19.2" - resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.19.2.tgz#885e0062d42cb325806273e7637a1407a29de7c7" - integrity sha512-bAJae/ZTLj5wvCv5+l7ZKWRruy7lgDjYaDAaTLapPrHtf46H4pfXXe5aeSv6mNRcQaKtQ9/MsygxnC/Onlkdng== +sequential-workflow-designer@^0.19.3: + version "0.19.3" + resolved "https://registry.yarnpkg.com/sequential-workflow-designer/-/sequential-workflow-designer-0.19.3.tgz#967967f5772e6cbd592def584e6ba78331a837bc" + integrity sha512-lDDclYAsbg8DXfVa4ZiFnCmnvbgO1A7bey2TO2Q6DfmiVqqQ8VhsDEpMXcSxT72O3nkQxn1YDVG2XZzpJBTxyA== dependencies: sequential-workflow-model "^0.2.0" diff --git a/demos/react-app/package.json b/demos/react-app/package.json index 46eace2..6c0af7d 100644 --- a/demos/react-app/package.json +++ b/demos/react-app/package.json @@ -6,8 +6,8 @@ "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", - "sequential-workflow-designer": "^0.19.2", - "sequential-workflow-designer-react": "^0.19.2" + "sequential-workflow-designer": "^0.19.3", + "sequential-workflow-designer-react": "^0.19.3" }, "devDependencies": { "@types/jest": "^29.2.5", diff --git a/demos/svelte-app/package.json b/demos/svelte-app/package.json index 984ba39..03ae555 100644 --- a/demos/svelte-app/package.json +++ b/demos/svelte-app/package.json @@ -16,8 +16,8 @@ "eslint": "eslint ./src --ext .ts" }, "dependencies": { - "sequential-workflow-designer": "^0.19.2", - "sequential-workflow-designer-svelte": "^0.19.2" + "sequential-workflow-designer": "^0.19.3", + "sequential-workflow-designer-svelte": "^0.19.3" }, "devDependencies": { "@sveltejs/adapter-static": "^2.0.3", diff --git a/designer/package.json b/designer/package.json index 8a07057..640ba10 100644 --- a/designer/package.json +++ b/designer/package.json @@ -1,7 +1,7 @@ { "name": "sequential-workflow-designer", "description": "Customizable no-code component for building flow-based programming applications.", - "version": "0.19.2", + "version": "0.19.3", "type": "module", "main": "./lib/esm/index.js", "types": "./lib/index.d.ts", diff --git a/designer/src/toolbox/scrollbox-view.ts b/designer/src/toolbox/scrollbox-view.ts index e04674c..9b8ebb0 100644 --- a/designer/src/toolbox/scrollbox-view.ts +++ b/designer/src/toolbox/scrollbox-view.ts @@ -2,6 +2,8 @@ import { Dom } from '../core/dom'; import { readMousePosition, readTouchPosition } from '../core/event-readers'; import { Vector } from '../core/vector'; +const MAX_DELTA_Y = 25; + const listenerOptions: AddEventListenerOptions & EventListenerOptions = { passive: false }; @@ -76,9 +78,9 @@ export class ScrollBoxView { e.stopPropagation(); if (this.content) { - const delta = e.deltaY > 0 ? -25 : 25; + const delta = Math.sign(e.deltaY) * Math.min(Math.abs(e.deltaY), MAX_DELTA_Y); const scrollTop = this.getScrollTop(); - this.setScrollTop(scrollTop + delta); + this.setScrollTop(scrollTop - delta); } } diff --git a/examples/assets/lib.js b/examples/assets/lib.js index 8a15919..90385b7 100644 --- a/examples/assets/lib.js +++ b/examples/assets/lib.js @@ -19,7 +19,7 @@ function embedStylesheet(url) { const baseUrl = isTestEnv() ? '../designer' - : '//cdn.jsdelivr.net/npm/sequential-workflow-designer@0.19.2'; + : '//cdn.jsdelivr.net/npm/sequential-workflow-designer@0.19.3'; embedScript(`${baseUrl}/dist/index.umd.js`); embedStylesheet(`${baseUrl}/css/designer.css`); diff --git a/react/package.json b/react/package.json index 4159114..298fbe8 100644 --- a/react/package.json +++ b/react/package.json @@ -1,7 +1,7 @@ { "name": "sequential-workflow-designer-react", "description": "React wrapper for Sequential Workflow Designer component.", - "version": "0.19.2", + "version": "0.19.3", "type": "module", "main": "./lib/esm/index.js", "types": "./lib/index.d.ts", @@ -47,7 +47,7 @@ "peerDependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", - "sequential-workflow-designer": "^0.19.2" + "sequential-workflow-designer": "^0.19.3" }, "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.1", @@ -63,7 +63,7 @@ "prettier": "^2.8.2", "react": "^18.2.0", "react-dom": "^18.2.0", - "sequential-workflow-designer": "^0.19.2", + "sequential-workflow-designer": "^0.19.3", "rollup": "^3.18.0", "rollup-plugin-dts": "^5.2.0", "rollup-plugin-typescript2": "^0.34.1", diff --git a/svelte/package.json b/svelte/package.json index 4cd9058..314ab1b 100644 --- a/svelte/package.json +++ b/svelte/package.json @@ -1,7 +1,7 @@ { "name": "sequential-workflow-designer-svelte", "description": "Svelte wrapper for Sequential Workflow Designer component.", - "version": "0.19.2", + "version": "0.19.3", "license": "MIT", "scripts": { "prepare": "cp ../LICENSE LICENSE", @@ -28,10 +28,10 @@ ], "peerDependencies": { "svelte": "^4.0.0", - "sequential-workflow-designer": "^0.19.2" + "sequential-workflow-designer": "^0.19.3" }, "devDependencies": { - "sequential-workflow-designer": "^0.19.2", + "sequential-workflow-designer": "^0.19.3", "@sveltejs/adapter-static": "^2.0.3", "@sveltejs/kit": "^1.20.4", "@sveltejs/package": "^2.0.0",