Comments (7)
+:100:
The Mobile demo is affected. Can't scroll down... I'm switching back to SwipeJS for this reason but I'll regularly check if dragend gets updated.
from dragend.
And I promise that I'll work on this. Sometime :-)
from dragend.
Any update on this? Trying to get this to work for me as well I haven't come up with much yet. Trying to see what direction the pages pick up and its strictly left and right. Never got a single up or down on the direction.
from dragend.
I was able to mitigate this issue by commenting out "event.preventDefault()" in the onMove method. It's not the best solution but it works.
from dragend.
@Ian-Y @jamealg I have found another JavaScript slider (also library agnostic) that works best and seems to be more maintained: https://github.com/wilddeer/Peppermint
from dragend.
@siamkreative Thank you very much!
from dragend.
I sort of found a solution, there are 2 dragend.js files, the one in the root directory and second is in the dist folder. Both of them have their issues. The first one has scrolling issue fixed, but left/right arrows do not work properly and the second one has just the scrolling issue. So what i did was, i just copied the updated code in _onMove function from the first file into the second file. Swiping on windows phone becomes nearly impossible to achieve (you can always add arrows), but android and IOS seemed to work fine.
This is how my onMove function looks like in dragend.js file
_onMove: function( event ) {
event = event.originalEvent || event;
// Fix mobile vertical scrolling, credits go to ptisdel
var coords = getCoords(event),
x = this.startCoords.x - coords.x,
y = this.startCoords.y - coords.y;
if (Math.abs(y) > Math.abs(x)) return;
// ensure swiping with one touch and not pinching
if ( event.touches && event.touches.length > 1 || event.scale && event.scale !== 1) return;
if (this.settings.disableScroll) event.preventDefault();
if (this.settings.stopPropagation) {
event.stopPropagation();
}
var parsedEvent = this._parseEvent(event),
coordinates = this._checkOverscroll( parsedEvent.direction , - parsedEvent.distanceX, - parsedEvent.distanceY );
this.settings.onDrag.call( this, this.activeElement, parsedEvent, coordinates.overscroll, event );
if ( !this.preventScroll ) {
this._scroll( coordinates );
}
},
from dragend.
Related Issues (20)
- The demo: with-control-elements does not work properly
- Block left/right swiping whilst scrolling vertical
- Last page aligned on right
- rtl support HOT 1
- One fix, One upgrade HOT 2
- Uncaught TypeError: this.container.hammer is not a function
- RC3: Last page doesn't show when using "new Dragend".
- Dragend not playing well with Onsen Splitter & Navigator HOT 1
- Resizing issue HOT 1
- How get current position web HOT 3
- What direction did I swipe? HOT 1
- Children events removed
- Too much height at bottom after rendered HOT 1
- Page with owl-carousel content inside it breaks when applying dragend()
- Keyboard navigation is inverted HOT 2
- Require.js HOT 3
- Dragend inside dragend?
- Dragend With Bootstrap (Modal Not Work Well)
- Ipad 2 and Ipad 3
- Vertical scrolling for each individual page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragend.