#NEWLINE# def on_touch_up( self , touch ) : #NEWLINE# #INDENT# if ( touch . grab_current == self ) : #NEWLINE# #INDENT# if ( ( touch . ud [ 'page' ] == 'previous' ) and ( ( abs ( ( touch . x - touch . ox ) ) / self . width ) > self . swipe_threshold ) ) : #NEWLINE# #INDENT# self . page -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( touch . ud [ 'page' ] == 'next' ) and ( ( abs ( ( touch . x - touch . ox ) ) / self . width ) > self . swipe_threshold ) ) : #NEWLINE# #INDENT# self . page += 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _trigger_layout ( ) #NEWLINE# #UNINDENT# #UNINDENT# touch . ungrab ( self ) #NEWLINE# #UNINDENT# if ( len ( self . children ) > 1 ) : #NEWLINE# #INDENT# return self . children [ ( ( - self . page ) + 1 ) ] . on_touch_up ( touch )