Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
natario1 committed Jan 23, 2019
2 parents 08cda64 + 5f41755 commit e37522d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/src/main/java/com/otaliastudios/zoom/ZoomEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,11 @@ internal constructor(context: Context) : ViewTreeObserver.OnGlobalLayoutListener
*/
override fun onScroll(e1: MotionEvent, e2: MotionEvent,
@AbsolutePan distanceX: Float, @AbsolutePan distanceY: Float): Boolean {

if (!mHorizontalPanEnabled && !mVerticalPanEnabled) {
return false
}

var delta = AbsolutePoint(distanceX, distanceY)
if (setState(SCROLLING)) {
// Change sign, since we work with opposite values.
Expand Down

0 comments on commit e37522d

Please sign in to comment.