Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
6be7293a
Commit
6be7293a
authored
6 years ago
by
patrickhlauke
Committed by
XhmikosR
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Abandon swipe altogether if more than one touch detected
parent
7b8f01d8
2 merge requests
!28721
Hot test
,
!27561
Adds font-weight-medium to font weight classes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/src/carousel.js
+4
-3
js/src/carousel.js
with
4 additions
and
3 deletions
+4
-3
js/src/carousel.js
+
4
-
3
View file @
6be7293a
...
...
@@ -283,8 +283,8 @@ class Carousel {
if
(
this
.
_pointerEvent
&&
(
originEvent
.
pointerType
===
PointerType
.
TOUCH
||
originEvent
.
pointerType
===
PointerType
.
PEN
))
{
this
.
touchStartX
=
originEvent
.
clientX
}
else
{
this
.
touchStartX
=
originEvent
.
touches
[
0
].
page
X
}
else
if
(
!
this
.
_pointerEvent
)
{
this
.
touchStartX
=
originEvent
.
touches
[
0
].
client
X
}
}
...
...
@@ -293,11 +293,12 @@ class Carousel {
// ensure swiping with one touch and not pinching
if
(
event
.
originalEvent
.
touches
&&
event
.
originalEvent
.
touches
.
length
>
1
)
{
this
.
touchDeltaX
=
0
;
return
}
if
(
!
this
.
_pointerEvent
)
{
this
.
touchDeltaX
=
event
.
originalEvent
.
touches
[
0
].
page
X
-
this
.
touchStartX
this
.
touchDeltaX
=
event
.
originalEvent
.
touches
[
0
].
client
X
-
this
.
touchStartX
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets