Implement SHIFT+Click to select range of files. #206
Former-commit-id: 15da15e0588d5977b42f71b8c96980248db73889 [formerly 95e464410bb619f4ff70b21d846e937bf9355e8a] [formerly cae63a6f6de24229ff04392fe16260c0d9045e8c [formerly 297a52e606afd39e9f544b359fefba405fe4b01b]] Former-commit-id: de9d291dba6c2e2d750c519f1fcbd59c34538ab1 [formerly 4fb3fcf8ba5726f6dde56fcbd8c1457799539a8e] Former-commit-id: ad1568f33fa927dc750515856950b95b588d9f68
This commit is contained in:
		
							parent
							
								
									58af3461a8
								
							
						
					
					
						commit
						ac044016ee
					
				| 
						 | 
				
			
			@ -115,15 +115,20 @@ export default {
 | 
			
		|||
    },
 | 
			
		||||
    click: function (event) {
 | 
			
		||||
      if (this.selectedCount !== 0) event.preventDefault()
 | 
			
		||||
      if (this.$store.state.selected.indexOf(this.index) === -1) {
 | 
			
		||||
        if (!event.ctrlKey && !this.$store.state.multiple) this.resetSelected()
 | 
			
		||||
 | 
			
		||||
        this.addSelected(this.index)
 | 
			
		||||
      } else {
 | 
			
		||||
      if (this.$store.state.selected.indexOf(this.index) !== -1) {
 | 
			
		||||
        this.removeSelected(this.index)
 | 
			
		||||
        return
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return false
 | 
			
		||||
      if (event.shiftKey && this.selected.length === 1) {
 | 
			
		||||
        let fi = (this.index > this.selected[0]) ? this.selected[0] : this.index
 | 
			
		||||
        let la = (this.index > this.selected[0]) ? this.index : this.selected[0]
 | 
			
		||||
        for (; fi <= la; fi++) this.addSelected(fi)
 | 
			
		||||
        return
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (!event.ctrlKey && !this.$store.state.multiple) this.resetSelected()
 | 
			
		||||
      this.addSelected(this.index)
 | 
			
		||||
    },
 | 
			
		||||
    touchstart (event) {
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
01a4cd8827c117228f6518fd0080cd522cd6bea8
 | 
			
		||||
60f3c5fb4e901be9b2920d60643c26ad4d414706
 | 
			
		||||
		Loading…
	
		Reference in New Issue