1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-21 20:35:31 +02:00

Fixing typo

This commit is contained in:
Antonio Laguna
2017-04-29 23:00:51 +02:00
parent 6e27dc809a
commit 7f3af9672c

View File

@@ -120,7 +120,7 @@ export default class Touch {
this.endX_ = info.x; this.endX_ = info.x;
this.endY_ = info.y; this.endY_ = info.y;
} else if (event.touches.length > 1) { } else if (event.touches.length > 1) {
this.startTouches = this.getTouchCoorinates(event); this.startTouches = Touch.getTouchCoordinates(event);
this.endTouches = this.startTouches; this.endTouches = this.startTouches;
this.isGesture = true; this.isGesture = true;
} }
@@ -139,7 +139,7 @@ export default class Touch {
const info = Touch.normalizeEventInfo(event); const info = Touch.normalizeEventInfo(event);
if (this.isGesture) { if (this.isGesture) {
this.endTouches = this.getTouchCoorinates(event); this.endTouches = Touch.getTouchCoordinates(event);
} else { } else {
this.endX_ = info.x; this.endX_ = info.x;
this.endY_ = info.y; this.endY_ = info.y;
@@ -189,9 +189,17 @@ export default class Touch {
* @param {Event} event * @param {Event} event
* @return {array} * @return {array}
*/ */
getTouchCoorinates(event) { static getTouchCoordinates(event) {
return [{x: event.touches[0].clientX, y: event.touches[0].clientY}, return [
{x: event.touches[1].clientX, y: event.touches[1].clientY}]; {
x: event.touches[0].clientX,
y: event.touches[0].clientY
},
{
x: event.touches[1].clientX,
y: event.touches[1].clientY
}
];
} }
/** /**