|  |  | @ -118,12 +118,23 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |         }) |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |         let _index=0 |  |  |  |         let _index=0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         group.on('dragstart',function (){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           const {x,y}=this.absolutePosition() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           this.startPos={ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             x:x, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             y:y | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  |         group.on('dragmove',function (){ |  |  |  |         group.on('dragmove',function (){ | 
			
		
	
		
		
			
				
					
					|  |  |  |           if(_index===0){ |  |  |  |           if(_index===0){ | 
			
		
	
		
		
			
				
					
					|  |  |  |             _index=this.getAttr('index') |  |  |  |             _index=this.getAttr('index') | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |           this.zIndex(999) |  |  |  |           this.zIndex(999) | 
			
		
	
		
		
			
				
					
					|  |  |  |           const {y:thisY}=this.absolutePosition() |  |  |  |           const {y:thisY}=this.absolutePosition() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           const dir=thisY-this.startPos.y>0?-40:40 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           const children=that.slGroup.children |  |  |  |           const children=that.slGroup.children | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           for (const child of children) { |  |  |  |           for (const child of children) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -132,34 +143,24 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             const {y:thatY}=child.absolutePosition() |  |  |  |             const {y:thatY}=child.absolutePosition() | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |             const moveDir=child.getAttr('moveDir')||0 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             const moveUpFlag=child.getAttr('moveUp')||false |  |  |  |             if (thisY>=thatY&&thisY<=thatY+40&&moveDir!==dir){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if (thisY>=thatY&&thisY<=thatY+40&&!moveUpFlag){ |  |  |  |               child.setAttr('moveDir',dir); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               child.setAttr('moveUp',true); |  |  |  |               _index+=dir>0?1:-1 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               child.setAttr('moveDown',false); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               --_index |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               child.move({ |  |  |  |               child.move({ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 y:-40 |  |  |  |                 y:dir | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               }) |  |  |  |               }) | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |               this.startPos={ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |                 x:x, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             const {y:_thatY}=child.absolutePosition() |  |  |  |                 y:thisY | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             const moveDownFlag=child.getAttr('moveDown')||false |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (thisY<=_thatY&&!moveDownFlag){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               const moveUpFlag=child.getAttr('moveUp')||false |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               if (moveUpFlag){ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 child.setAttr('moveUp',false); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 child.setAttr('moveDown',true); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 ++_index |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 child.move({ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   y:40 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }) |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |               } |  |  |  |               } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |           } | 
			
		
	
		
		
			
				
					
					|  |  |  |         }) |  |  |  |         }) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         group.on('dragend',function (){ |  |  |  |         group.on('dragend',function (){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           console.log(_index) | 
			
		
	
		
		
			
				
					
					|  |  |  |           const index=this.getAttr('index') |  |  |  |           const index=this.getAttr('index') | 
			
		
	
		
		
			
				
					
					|  |  |  |           const element = slList.splice(index-1, 1)[0]; |  |  |  |           const element = slList.splice(index-1, 1)[0]; | 
			
		
	
		
		
			
				
					
					|  |  |  |           slList.splice(_index-1, 0, element); |  |  |  |           slList.splice(_index-1, 0, element); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |