mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-06-25 01:10:32 +03:00
feat: drag limit on left
This commit is contained in:
@@ -262,9 +262,13 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
isPosOutOfDragRange(xStart, xEnd){
|
isPosOutOfDragRange(xStart, xEnd){
|
||||||
|
// 不能推动旁边的bar时,拖拽就不停止
|
||||||
if(!this.ganttChartProps.pushOnOverlap) {
|
if(!this.ganttChartProps.pushOnOverlap) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if(xStart && xStart < 0) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if(xStart && this.dragLimitLeft !== null && xStart < this.dragLimitLeft + this.getMinGapBetweenBars()){
|
if(xStart && this.dragLimitLeft !== null && xStart < this.dragLimitLeft + this.getMinGapBetweenBars()){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user