Skip to content

Commit 8867d97

Browse files
author
Gaillard
committed
v3.0.0-beta.9 fix for mobile touch event
1 parent c7b2d3f commit 8867d97

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

projects/angular-split/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-split",
3-
"version": "3.0.0-beta.8",
3+
"version": "3.0.0-beta.9",
44
"description": "Angular UI library to split views and allow dragging to resize areas using CSS flexbox layout.",
55
"author": "bertrandg",
66
"repository": {

projects/angular-split/src/lib/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { IArea, IPoint, IAreaSnapshot, ISplitSideAbsorptionCapacity, IAreaAbsorp
44

55
export function getPointFromEvent(event: MouseEvent | TouchEvent): IPoint {
66
// TouchEvent
7-
if((<TouchEvent> event).touches !== undefined && (<TouchEvent> event).touches.length > 0) {
7+
if((<TouchEvent> event).changedTouches !== undefined && (<TouchEvent> event).changedTouches.length > 0) {
88
return {
9-
x: (<TouchEvent> event).touches[0].clientX,
10-
y: (<TouchEvent> event).touches[0].clientY,
9+
x: (<TouchEvent> event).changedTouches[0].clientX,
10+
y: (<TouchEvent> event).changedTouches[0].clientY,
1111
};
1212
}
1313
// MouseEvent

0 commit comments

Comments
 (0)