diff --git a/CHANGELOG.md b/CHANGELOG.md index f1335a25..8d9a849f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### + ## 8.2.2 - Fix `Konva.Arrow` rendering when it has two pointers diff --git a/package.json b/package.json index bfc51e94..78e620cb 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test:build": "parcel build ./test/unit-tests.html --dist-dir test-build --target none --public-url ./ --no-source-maps", "test:browser": "npm run test:build && mocha-headless-chrome -f ./test-build/unit-tests.html -a disable-web-security", "test:node": "env TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha -r ts-node/register test/unit/**/*.ts --exit && npm run test:import", - "test:watch": "rm -rf ./parcel-cache && parcel serve ./test/unit-tests.html ./test/manual-tests.html", + "test:watch": "rm -rf ./parcel-cache && parcel serve ./test/unit-tests.html ./test/manual-tests.html ./test/sandbox.html", "tsc": "tsc --removeComments && tsc --build ./tsconfig-cmj.json", "rollup": "rollup -c", "clean": "rm -rf ./lib && rm -rf ./types && rm -rf ./cmj && rm -rf ./test-build", diff --git a/src/Util.ts b/src/Util.ts index 68e43768..9bc0be1f 100644 --- a/src/Util.ts +++ b/src/Util.ts @@ -965,8 +965,8 @@ export const Util = { }, _getFirstPointerId(evt) { if (!evt.touches) { - // fake id for mouse - return 999; + // try to use pointer id or fake id + return evt.pointerId || 999; } else { return evt.changedTouches[0].identifier; } diff --git a/test/sandbox.html b/test/sandbox.html index 274bae56..788df275 100644 --- a/test/sandbox.html +++ b/test/sandbox.html @@ -22,9 +22,53 @@
- Some text - - +