diff --git a/.all-contributorsrc b/.all-contributorsrc
index 50140e260..a24632010 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -383,6 +383,15 @@
"review",
"userTesting"
]
+ },
+ {
+ "login": "slak44",
+ "name": "Θtefan Silviu-Alexandru",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8948001?v=4",
+ "profile": "https://github.com/slak44",
+ "contributions": [
+ "code"
+ ]
}
],
"contributorsPerLine": 7
diff --git a/README.md b/README.md
index ba1724ed6..3ad872bb5 100755
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
[![Build Status][build-badge]][build]
[![Coverage Status][coverage-badge]][coverage]
-[](#contributors)
+[](#contributors)
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
@@ -165,7 +165,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Juan Narvaez](https://github.com/jdnarvaez)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=jdnarvaez "Code") | [
Mike](https://github.com/mikehazell)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Documentation") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Code") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Tests") | [
Sangkeun Kim](http://sisobus.com)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=sisobus "Code") [π¬](#question-sisobus "Answering Questions") | [
Victor Saase](https://github.com/vsaase)
[π€](#ideas-vsaase "Ideas, Planning, & Feedback") | [
Michael Wasser](http://www.mikewasser.com)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=untoldone "Documentation") | [
Amandeep Singh](https://github.com/singhArmani)
[π](#content-singhArmani "Content") | [
Madison Dickson](http://mix3dstudios.com)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mix3d "Documentation") |
| [
Kevin Lee Drum](https://github.com/kevinleedrum)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kevinleedrum "Code") | [
Makarand Bauskar](https://github.com/mmbauskar)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mbauskar "Code") | [
Biharck Araujo](http://www.biharck.com.br)
[π‘](#example-biharck "Examples") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=biharck "Documentation") | [
Devon Bernard](https://www.linkedin.com/in/devonbernard)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=DevonBernard "Documentation") | [
Karl-Heinrich](https://github.com/Karl-Heinrich)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3AKarl-Heinrich "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Code") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Tests") | [
counterxing](https://blog.xingbofeng.com/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Axingbofeng "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=xingbofeng "Code") | [
Jorge Lopes](https://github.com/jlopes90)
[π¬](#question-jlopes90 "Answering Questions") |
| [
Gabriel Garrido](http://garrido.io)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Ggpsv "Code") | [
ASVBPREAUBV](https://github.com/ASVBPREAUBV)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=ASVBPREAUBV "Documentation") | [
frolic06](https://github.com/frolic06)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=frolic06 "Code") | [
codepage949](https://github.com/codepage949)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=codepage949 "Code") | [
Asherah Connor](https://kivikakk.ee)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kivikakk "Code") | [
Ikko Ashimine](https://bandism.net/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Aeltociear "Bug reports") | [
Bill Wallace](https://github.com/wayfarer3130)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=wayfarer3130 "Code") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=wayfarer3130 "Documentation") |
-| [
Bruno Alves de Faria](http://radicalimaging.com/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Abrunoalvesdefaria "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Code") [π](#content-brunoalvesdefaria "Content") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Documentation") [π](#plugin-brunoalvesdefaria "Plugin/utility libraries") [π](#review-brunoalvesdefaria "Reviewed Pull Requests") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Tests") [π§](#tool-brunoalvesdefaria "Tools") [π](#userTesting-brunoalvesdefaria "User Testing") | [
Igor Octaviano](http://igoroctaviano.com)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=igoroctaviano "Code") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=igoroctaviano "Documentation") [π§](#maintenance-igoroctaviano "Maintenance") [π](#review-igoroctaviano "Reviewed Pull Requests") [π](#userTesting-igoroctaviano "User Testing") |
+| [
Bruno Alves de Faria](http://radicalimaging.com/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Abrunoalvesdefaria "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Code") [π](#content-brunoalvesdefaria "Content") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Documentation") [π](#plugin-brunoalvesdefaria "Plugin/utility libraries") [π](#review-brunoalvesdefaria "Reviewed Pull Requests") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=brunoalvesdefaria "Tests") [π§](#tool-brunoalvesdefaria "Tools") [π](#userTesting-brunoalvesdefaria "User Testing") | [
Igor Octaviano](http://igoroctaviano.com)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=igoroctaviano "Code") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=igoroctaviano "Documentation") [π§](#maintenance-igoroctaviano "Maintenance") [π](#review-igoroctaviano "Reviewed Pull Requests") [π](#userTesting-igoroctaviano "User Testing") | [
Θtefan Silviu-Alexandru](https://github.com/slak44)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=slak44 "Code") |
This project follows the [all-contributors][all-contributors] specification.
diff --git a/src/eventListeners/touchEventListeners.js b/src/eventListeners/touchEventListeners.js
index 3556f2d41..837a7d58f 100644
--- a/src/eventListeners/touchEventListeners.js
+++ b/src/eventListeners/touchEventListeners.js
@@ -318,6 +318,9 @@ function onTouch(e) {
break;
case 'panmove':
+ if (!lastDelta || !startPoints) {
+ return false;
+ }
// Using the delta-value of HammerJS, because it takes all pointers into account
// This is very important when using panning in combination with pinch-zooming
// But HammerJS' delta is relative to the start of the pan event
@@ -437,8 +440,9 @@ function onTouch(e) {
clearTimeout(pressTimeout);
// If lastPoints is not yet set, it means panend fired without panstart or pan,
- // So we can ignore this event
- if (!lastPoints) {
+ // same with startPoints and touchstart/touchend
+ // So we can ignore these events
+ if (!lastPoints || !startPoints) {
return false;
}
diff --git a/src/tools/MagnifyTool.js b/src/tools/MagnifyTool.js
index 35c2680b3..29ed87398 100644
--- a/src/tools/MagnifyTool.js
+++ b/src/tools/MagnifyTool.js
@@ -87,7 +87,7 @@ export default class MagnifyTool extends BaseTool {
this._createMagnificationCanvas(element);
}
- if (this.zoomCanvas === undefined) {
+ if (this.zoomCanvas === undefined || !evt.detail.currentPoints) {
return;
}
@@ -98,7 +98,7 @@ export default class MagnifyTool extends BaseTool {
// Calculate the on-canvas location of the mouse pointer / touch
const canvasLocation = external.cornerstone.pixelToCanvas(
- evt.detail.element,
+ element,
evt.detail.currentPoints.image
);