Unselect after touch drag as keys now invalidated due to new index order; Removing touchend from track
This commit is contained in:
@ -228,7 +228,7 @@ export default class Track extends React.Component{
|
||||
className={className}
|
||||
onMouseEnter={e => this.setState({hover: true})}
|
||||
onMouseLeave={e => this.setState({hover: false})}
|
||||
onTouchEnd={e => this.handleTouchEnd(e)} // When touch dragging is dropped on me
|
||||
//onTouchEnd={e => this.handleTouchEnd(e)} // When touch dragging is dropped on me
|
||||
onMouseDown={e => this.handleMouseDown(e)} // Click (or potentially a mouse drag start)
|
||||
onMouseMove={e => this.handleMouseMove(e)} // Any movement over me
|
||||
onMouseUp={e => this.handleMouseUp(e)} // End of click, or potentially a dragging drop event
|
||||
|
||||
@ -171,8 +171,11 @@ class TrackList extends React.Component{
|
||||
let siblings = over.parent().children('.track')
|
||||
let dropped_at = siblings.index(over) - 1
|
||||
|
||||
console.log('touchend',helpers.arrayOf('index',this.digestTracksKeys()),'to',dropped_at)
|
||||
|
||||
if (this.props.reorderTracks !== undefined){
|
||||
this.props.reorderTracks(helpers.arrayOf('index',this.digestTracksKeys()),dropped_at)
|
||||
this.props.uiActions.setSelectedTracks([])
|
||||
}
|
||||
}
|
||||
|
||||
@ -394,7 +397,6 @@ class TrackList extends React.Component{
|
||||
handleDrag={e => this.handleDrag(e, track_key)}
|
||||
handleDrop={e => this.handleDrop(e, track_key)}
|
||||
handleTouchDrag={e => this.handleTouchDrag(e, track_key)}
|
||||
handleTouchDrop={e => this.handleTouchDrop(e, track_key)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user