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